The database (schemata) browser is the primary screen of the object browser. You can use the database browser not only to select tables and fields to query, you can also edit tables, create new tables and databases, and drop tables and databases. The database browser can be used to set the default database; this is required before you can issue queries against tables.
The current default database will always be highlighted with bold text. To change the default database, right click on the desired database and choose the Make Default Schema option or simply double click on the desired database.
You can filter the databases shown by using the search bar at
the top of the database browser. As you fill in the search bar,
databases that do not match your search are hidden from view.
You can clear the search bar by clicking the
X button on the right side of the search
bar. All databases will once again be displayed. You can specify
what objects are filtered by clicking on the magnifying glass
icon at the left side of the search bar and choosing the
appropriate option. Options include Schemata
,
Schema Assets
,
Columns/Indices
and Custom
Selection
.
To view a database's tables, stored procedures, and views, click the black arrow on the left of the database name. You can view a table's columns by clicking on the black arrow to the left of the table name. Columns that form part of a primary key have a small key icon to the left of their name. Otherwise they have a blue diamond icon.
When you click the black arrow to the left of a view, the columns that form the view are shown. When you click the black arrow to the left of a stored procedure or stored function, the arguments of the stored procedure or function are shown.
To create a new database, right click within the database browser and choose the Create New Schema option. To create a new table, right click the database you wish to add a table to and choose the Create New Table option. To create a new view, right click within the database you wish to add a view to and choose the Create New View option. To create a new stored procedure or stored function, right click within the database you wish to add to and choose the Create New Procedure / Function option. You can drop objects by right clicking on the object you wish to drop and choosing the appropriate option (Drop Schema, Drop Table, etc.).
You can edit an object by right clicking on it and choosing the
appropriate edit option (Edit Table,
Edit View, etc.). When you choose the
Edit Table option, the MySQL Table Editor will be
displayed with the selected table. For more information on
editing tables, see The MySQL
Table Editor. When the Edit View,
Edit Function, or Edit
Procedure options are chosen, the CREATE
VIEW
, CREATE PROCEDURE
, or
CREATE FUNCTION
statement will be shown in a
new tab using the Script Editor. It is possible to edit all
server functions/procedures at once by choosing the
Edit All Stored Procedures / Functions option
from the Script menu.
If you need the CREATE statement for any object, right click on
the object and choose the Copy SQL to
Clipboard option. The appropriate
CREATE
statement will be copied to the
clipboard and can be used to recreate the selected object.
Only the object itself is created with the Copy SQL to Clipboard command, the statements required to populate the object are not created.