Getting Started: 2 Minute Tutorial
To get started on a database design follow these 5 easy steps:
(1) Create A Database:
On the File menu, click New. In the dialog box that appears, enter the name of the database. Click Ok.
A database has been created.
(2) Creating a Diagram:
In the Database Explorer window that appears, right click on the Diagrams node.
In the popup menu, click Add Diagram. In the dialog box that appears, enter a name for the diagram and click Ok.
This empty diagram should now appear in the top right pane of the Database Explorer window.
(3) Creating a Table:
Right click anywhere on the newly created diagram.
In the popup menu, click Add Table. A simple dialog like this one will appear:
Fill in a table name and click Ok to create an empty new table.
Or you can click the Advanced button to make use of column templates. The dialog will then look like this:
Use Column Templates to Populate a New Table.
To add columns based on any of the 6 templates, ensure that the Use This Template checkbox is selected. Feel free to modify the template column's name, datatype, length, etc. Using templates is a quick way to add common columns to tables.
(4) Add More Columns to a Table:
In the diagram click on a table.
The bottom right pane of the window will show all the columns, indexes and triggers for that table.
Click on the Add Column button to add new columns.
(5) Create a Foreign Key:
In the diagram, right click on the table you wish to add a foreign key to.
In the popup menu, click Add Foreign Key From and then select the parent table of this foreign key.
DbWrench will automatically add the primary key column(s) from the parent table to the child table if those columns are not present in the child table.
See also: