Designing an Entity Relationship Diagram in MyEclipse

Source: Internet
Author: User

Er-designer provides a number of tools and features to help you create, reorganize, and customize ER diagrams, and it can also export ER diagrams in JPEG format. In this tutorial, you will learn to:

    • Entity diagram (ERD) retrieved from the database in reverse
    • Using table data in an ER diagram
    • Routing Table relationships
    • Lookup table
    • Exporting an ER diagram saves it as a JPEG image

Duration: 10 minutes

No myeclipse? Download Now

1. Create an Entity Relationship (ER) diagram from the database

In this section we show you how to create an ERD from an existing database, and the example given uses the Oracle 9i Human Resources (HR) sample database.

(1) Select Window>open perspective>myeclipse Database Explorer.

(2) in the database browser, right-click the database or schema to create an ER diagram, and select New ER Diagram.

Entities created from a database-diagram

(3) Select the project and enter the file name for the new ER diagram, but be aware that. MER is the default file extension for Er-designer. If your workspace does not have an item, the list is empty, so you must cancel the process and recreate a project to continue the process.

Select a new ER diagram location

(4) Click OK to start the process of database analysis and diagram creation.

(5) Select a table on the left and click the Add button to include it in the diagram. After you have added the table you want in the diagram, click Finish.

Select Table

The reverse acquisition of ER diagrams from the database requires Er-designer to download and analyze the metadata for the database. The retrieval of metadata can be time-consuming, given the size of the database, the number of tables that have been selected, and the performance of the connection to the database server. Therefore, you can run this process in the background by clicking the Run in Background button in the Progress window.

Process window accesses the metadata of the database at the same time

Once the process is complete, the new Hr.mer file is created. Note: The above unchecked regions table will be left and unselected, and it does not exist in any diagram or outline view.

Workbench Display Hr.mer File2. Update the table data in the diagram

The ER diagram can be refreshed based on the current state of the database from which it is derived. The process of its flushing design retrieves the metadata of the database and checks it with the state of the ER diagram. You can select a table, group, or entire ER diagram to refresh whenever necessary.

Select one or more table refreshes, right-click, and choose Refresh table from the menu. The metadata for the selected table and update diagram is retrieved interactively with the Er-designer of the Database Explorer.

Refresh Table

To refresh a complete diagram, select View>refresh Diagram. In the window that refreshes the ER diagram, allows you to add and remove tables from the chart. The table in your diagram cannot be removed from the list of selected tables; Conversely, if a table is not currently in your diagram, you can add the table from the selected list. The metadata for the selected table and update diagram is retrieved interactively with the Er-designer of the Database Explorer.

Refresh ER Diagram3. Add a table to the ER diagram

(1) In the database browser, select the table you want to add to the diagram.

(2) Drag and drop the table to the correct position in the ER diagram and refresh it immediately if a table is already in the diagram.

Adding a table to an ER diagram

Note : The above table additions can also be implemented by selecting View>refresh diagram from the menu.

4. Delete a table from the ER diagram

Select the table or group that you want to delete, and then press the DEL key. Alternatively, you can select Edit>delete from the menu, or right-click the table and select Delete.

Delete a table

Deleting the selected table will also delete the corresponding import and export relationships.

Note: To undo the deletion of a table, right-click the diagram and select Undo. It also supports full undo and redo.

5. Routing and re-routing relationships

Manually route the relationship connection by selecting the target relationship, and then connecting the curved points together. When you select a relationship, the graph changes as follows:

    • The color of the relationship line changes to red
    • The background color of the relationship table becomes the selected color
    • Curved point (small black knob) appears
The selected relationship shows its curved point

Manual routing relationships can be automatically re-elected with the MyEclipse layout engine, which is useful when manual routing produces undesirable results and you want to go back to the automatic relationship layout.

To automatically re-elect a routing relationship, right-click the manual re-election route relationship and select Reroute. The layout engine's re-election routing relationship uses its optimization algorithm.

Re-election routing relationship auto-re-routing6. Locating and selecting Tables

To view and select tables, use outline view to do the following:

    1. If the outline view is not already open, select Window>show view>outline.
    2. Scrolling the outline view selects the desired table, which causes the corresponding ER diagram to be highlighted and scrolled into view.

The Job_history table that is selected in outline view and the corresponding ER chart symbols are displayed prominently.

Find a table using outline view

To use the location search for a table, do the following:

(1) Click the table Search icon on the Outline view toolbar.

Open the Table Locator Table Locator window from outline view

(2) If your table is not visible in the list, enter the first few characters of the table name. In the text you enter, the table name set by the list filter contains a prefix.

(3) Select the table you want to view, and then click OK. The table locator closes, scrolls the selected table into view in Er-designer, and highlights it.

7. Export Diagram

To export the ERD, right-click Er-designer and choose Export in JPEG format from the menu. This opens a File selection dialog box that lets you specify the location of the JPEG image.

Note : A large ERD may be an image of hundreds of megabytes, and in some cases this may cause the export operation to fail because the image is too large to manage.

Export JPEG

MyEclipse official Chinese online line, welcome to download Communication!

Designing an Entity Relationship Diagram in MyEclipse

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.