Entity Relations Designer in MyEclipse
1. Visualize Entity Relations with an ER Diagram
The MyEclipse Entity Relations Designer helps you visually manage the lifecycle of a relational database from design, through implementation, and maintenance. The MyEclipse ER-Designer provides a visual model of existing databases. The ER-Designer utilizes the database connectors of the Database Explorer to access a database's metadata as it reverse engineers the database's entity relations (ER) model. From that, the ER-Designer renders the model using the Information Engineering (IE) System for ER as an entity relation diagram (ERD). At any time, the ER-Designer can synchronize an ERD with its database to accurately reflect the current state of the database. The ER Design includes a sophisticated table and relationship layout engine that enables it to quickly lay out an ERD.
2. Notation and Presentation Basics
The ER-Designer supports Information Engineering for ER notation, a.k.a., crows feet notation. During the reverse engineering process, only the cardinality of the child entity of a parent-child relationship is depicted. The figure below depicts an annotated relation. Notice the details compartment of a table defines each table column, the column's type, and its role, such as a primary or foreign key. The table below defines the meaning of the icons and text styles used in the table details compartment.
2.1 Positioning Tables
You can position a table in any location on the ER-Designer by dragging it to a new location. Any relocation operation can be reversed using the Eclipse Undo command or its equivalent keyboard shortcut (e.g., CTRL+Z). When a table is selected, it is presented with a distinct highlighted background color. In the image below, the JOBS table is selected.
|Example Table||Symbol/Text Style||Value|
|underlined text + or||Primary Key|
|bold text||Not NULL constraint|
|/||Expand/Collapse details compartment|
A relationship is depicted as a directed, labeled connection between two database table entities. The connection's label is based on the pattern: parentTable(column1,...)= childTable(column1,...) mapping. Next to the relationship label is a direction arrow that points from the parent table to the child table (->). When you fly-over a connection, the foreign key constraint name is displayed. For example the JHIST_JOB_FK constraint is depicted above in the example entity relationship image, just below the relation in bright blue text. The table below describes ER-Designer relationship annotations.
|One and only one|
|One or more|
|Zero or more|
|Zero or one|
The ER-Designer provides a visual grid, grid alignment and table sizing tools to help you manually layout tables and relationship routing in a uniform and aesthetically pleasing style.
To toggle the visual Grid feature on/off, select the ER-Designer, and select View>Grid from the menu.
Snap to Grid
The Snap To Grid feature facilitates the manual alignment of tables and relationships by constraining their placement to align with vertical and horizontal grid lines. The grid is NOT required to be visible for this feature to be activated. To toggle the Snap to Grid feature on/off, select the ER-Designer, and select View>Snap To Grid from the menu.
Labels for relationships between tables are shown by default. To toggle label visibily, select the ER-Designer,and select View>Relationship Labels from the menu.
Horizontal and Vertical Alignment Tools
The ER-Designer contributes table alignment tools to the MyEclipse toolbar. Select two or more tables you want to align, and select an alignment style from the MyEclipse toolbar.
Table Resizing Tools
The ER-Designer contributes table resizing tools to the MyEclipse toolbar. Select two or more tables you want to resize, and select a resizing style from the MyEclipse toolbar.
3. Table Location Features
Browsing a large entity relation diagram to locate tables can be tedious. To simplify this process the ER-Designer provides two table location features. The first is an Outline view that depicts the database tables in a tree list. The second is a Table Locator that provides fast table name search and location.
The image below shows the JOB_HISTORY table selected in the outline view and the corresponding ER digram table symbol highlighted and visible.
In addition to using the Outline view to locate tables, the ER-Designer provides the Table Locator, a pop-up window with a fast text search feature. Launch the Table Locator from either the ER-Designer's right-click context menu, the Navigate menu bar, the Outline view toolbar, or by pressing ALT+F3.
You can customize the look-and-feel of the ER-Designer using the preference page. To access the ER-Designer preference page, select Window>Preferences, expand MyEclipse>Database Explorer and select ER-Designer.