The Database Builder
The Database Builder is a tree-based interface that helps you to develop and test models of databases and generate schema from these models in one place, by:
|·||Providing a number of structures automatically tailored to the Database Management System you are modeling for, and|
|·||Guiding you through the process of developing the model with panels and dialogs to identify and record the appropriate data for the model|
You can use the Database Builder to:
|·||Create, edit and delete database objects (Tables, Views, Procedures, Sequences and Functions)|
|·||Create, edit and delete Table constraints (Unique Constraints, Primary Keys, Indexes, Check Constraints and Triggers)|
|·||Create, edit and delete Table Foreign Keys|
|·||Reverse engineer database schema information|
|·||Generate DDL from a modeled database|
|·||Compare a live database schema with a modeled database|
|·||Execute generated DDL against a live database|
|·||Execute adhoc SQL statements against a live database|
Using the Database Builder to develop a database model is an alternative method to creating elements on diagrams, which you might prefer to do. You can use both methods in parallel; structures you create on a diagram will appear in the Database Builder. However, structures you create in the Database Builder have no diagram orientation information, so will not appear on a diagram unless you manually drag them from the Project Browser onto the diagram. General information on database modeling and data structures applies equally to both methods.
Access Tools | Database Builder
When you first open the Database Builder, it searches the entire project for all Packages that have the stereotype <<Data Model>> and loads the corresponding database models as root nodes, listing them in the left-hand panel.
You would have created these models using the Model Wizard to generate a model structure appropriate to each DBMS you are modeling for. You can select any one of the models and expand it to display the Packages for the data structures appropriate to the DBMS. To open the model, either:
|·||Double click on the database name, or|
|·||Right-click on the database name and select Connect|
From this point, you can begin to model the database data structures in their corresponding Packages, starting with Tables. Alternatively, you can import database schema to edit, either directly or using the model/database synchronization facility.
To synchronize and test your database model you make enquiries against a live database. To make the process of connecting to the database easier, the connection details of the database are stored as Database Connection objects, listed in the Connections Package. A modeled database can have several database connections defined; however, only one can be active at a time.
It is possible to flag a database connection as the default for the model, so that whenever the model is selected the flagged database connection will be automatically made active.
|·||As you work within the Database Builder or any diagrams external to it, at intervals right-click on the display and select the Refresh All option to update the tabs and panels with the latest changes|