EOModeler starts the New Model Wizard, which assists you to configure your new model. The following sections describe the wizard pages that guide you through the model creation process.
Figure 2. Selecting an Adaptor
After you select an adaptor, EOModeler displays the login panel for the database that corresponds to the adaptor you selected. Fill in the login panel and click OK.
Figure 3. Oracle Login Panel
Different databases require different login information, so each database's login panel looks different.The examples in this chapter use the Oracle version of the Movies database included with the Enterprise Objects Framework; Figure 3 shows the Oracle login panel.
Figure 4. Choosing What to Include in the Model
Figure 5. Choosing the Tables to Include
Choosing What to Include in Your Model
In this next wizard page, you can specify the degree to which the wizard configures your model. Choosing the Tables to Include
After specifying what additional information to include in your model, the wizard prompts you to choose the tables to include in your model. By default, all the tables are selected.
However, if primary key information isn't specified in your database server's schema information or if the adaptor can't read it (as with Microsoft Access), the wizard now asks you to specify a primary key for each entity.
Figure 6. Specifying an Entity's Primary Key
If an entity's primary key is compound; that is, if it's composed of more than one attribute, control-shift-click to select all of the attributes in the primary key. You use a compound primary key when any single attribute isn't sufficient to uniquely identify a row. For example, in the MovieRole entity, if requires the combination of the movieId and talentId attributes to uniquely identify a row.
On the other hand, if you're using a database that stores foreign key definitions in its database server's schema information, the wizard reads them and creates corresponding relationships in your model. For example, Movie has a to-many relationship to MovieRole (that is, a Movie has an array of MovieRoles), and Talent has a to-many relationship to MovieRole.
Figure 7. Specifying Referential Integrity Rules for a Relationship
Delete Rule
Figure 8. Choosing the Stored Procedures to Include
Saving the Model
When you finish the wizard, EOModeler displays the new model. If you're planning to use your model in an application for which you've already created a project, you should save the model into your project folder. You will be prompted to add it to the project; click OK.
Table of Contents Next Section