How to Join tables in MySql workbench? - mysql

How do I Join tables with mySql workbench visually? without using any SQL script or typing it into the query menu? I am new when it comes to using this MySql workbench, but I tried looking at their documentation and I haven't found any, any help??

Please try these links:
http://net.tutsplus.com/tutorials/databases/visual-database-creation-with-mysql-workbench/
http://www.packtpub.com/article/visual-mysql-database-design-in-mysql-workbench
They give some good screenshot-oriented tutorials (especially since this is for using the graphical user interface to create your database and its objects)

To join tables without using any SQL script or typing it into the query menu:
1) Use the EER diagram: on the menu bar ==> FILE ==> select NEW MODEL from the dropdown, then ==> click on the "Model" tab use dropdown to "Add Diagram", that will open the grid screen where you can simply click on the GUI's on the left side of the grid to create tables, join tables... you'll need to save your model for future use, if needed.

Related

How To See SQL Code in phpmyadmin SQL Table

I am trying to see the manual SQL code for a table I created using the graphical user interface. Is there a way to do this and if so how?
use
SHOW CREATE TABLE tablename
see manual
nbk is correct that you would use the SHOW CREATE TABLE command, which is also implemented graphically in phpMyAdmin. From the database structure page (where you see a list of tables), click to select the checkbox for any tables you wish to see the syntax for and the use the "With selected:" dropdown menu on the page to pick "Show create".
It does the same thing, but using the phpMyAdmin interface.
"With selected:" dropdown on the table page
Output of "Show create"

MySQL Workbench Data Export Select Tables

I am using the Data Export functionality to create a dump of a database in MySQL Workbench. Once I select the database, I want to select a subset of the tables on the right side in the screenshot. However, the list of tables is not displayed. How do I make a single-file dump of a subset of tables of a database?
Click on one row and you see the tables
It may sound dumb from me, but have you tried to click on the database choosen, not just check it.
Try to click the name of the database.

Change existing MySQL table inside NetBeans

I created a table inside NetBeans but one column is wrong type, it should be char instead of int. Is it possible to change it or do I have to delete the whole table and start again?
I searched all context menus but can't find "modify"/"edit" option.
my suggestion also you have two options :
1) By using Netbeans, you could edit (change) the current mysql table via Command Execution.
2) By using mysql ADministrator tool, such as MySQL Query Browser from mysql GUI Tool itself
Happy coding!
you can right click on the column name and select "delete option", then right click on the table name and select "add column" option.

How to create E-R diagram in mysql

I am using MySQL. There are 28 tables in my database. I've tried to use MySQL Workbench to create E-R diagram. As there are 28 tables, everything is messed up in diagram using MySQL Workbench. Is there any way to create E-R Diagram which shows all relations properly between 28 tables??
Thanks
The only free app I've been able to find that generates decent graphics (not beautiful but quite clear) is SchemaSpy. It's a command line Java program that generates quite comprehensive HTML documentation for any DBMS.
To Create ER Diagram in MySQL follow these steps:
1.First install MySQL Workbench in your computer
Click File->Import->Reverse Engineer MySQL Create Script.
Click Browse and select your SQL create script.
Make Sure "Place Imported Objects on a diagram" is checked.
Click Execute Button.
Click Model->Add Diagram.
Open Catalog Tree and select/drag your tables on your ERR diagram.
ERWin is another good tool. Allowing you to generate erd from sql code and sql code from er diagrams. Its a Drag and Drop utility.
SQL yog is one of the best tool which generate ERD and represents the relationship between different tables.
It is also drag and drop utility and provide complete access to your mysql database.
Open the MySQL Workbench and then go to Database -> Reverse Engineer (in this wizard you have 7 steps to generate the ER Diagram)
1-Connection Options:
For Stored Connection :( Select local instance )
For Password: Click on the Store in Vault.. and then enter your password
Then click on the next.
2-Connect to DBMS:
Click on the next (In this step you do not need to do anything)
3-Select Schemas
Here, select your desire Schema in order to generate an ER Diagram
4-Retrieves Objects
Click on the next (In this step you do not need to do anything)
5-Select Objects
In this step, you can click on the Show Filter to exclude some table if you like
Here, I exclude the emailAddresses table in order not to show that in the ER Diagram
6-Reverses Engineers
Click on the next (In this step you do not need to do anything)
7-Results
Click on the finish to see the Diagram

MySQL Workbench to generate Catalog diff

I have problem using generate catalog diff in database tab, in MySQL Workbench, I am using ver5.2.33, the option generate catalog option has been disabled, while other option like, forward eng, reverse eng, synchronize model, works fine. Still I used the existing model only.
Option generate catalog diff is always been disabled.
I am using version 5.2.35 CE which should be similar to yours
Make sure all tabs are closed. ( For simplicity and lack of confusion )
Now that you are on "home" which should be an icon of a house on the tab, Go ahead and select new EER Diagram
On this page, you are going to click on menu Database and then select "Create diff Catalog"
Here you will choose option live for both connections
The next screen you will select your live database
Then on the next screen you will select the database you wish to compare.
The next screen you will select your live database you wish to compare to
Then on the next screen you will select the database you wish to compare.
The next screen will show you all your differences, it may take a little while for them to appear. For me, it took about 30 seconds with a 25MB database
If you already know those steps and cannot seem to reach them, then I highly suggest reinstalling your MySQL Workbench software.