Oracle Database Design with Entity Relationship Diagram
This tutorial shows you how to design Oracle database with Visual Paradigm. We will use Entity Relationship Diagram (ERD) to design database and then generate database initialization script directly to Oracle database.
Topics
1.Create physical database design ERD
2.Draw entities and connecting relationships
3.Create columns and primary keys
4.Connect to oracle database through JDBC
5.Export database schema to Oracle database
- In Visual Paradigm, create a new project by selecting File > New Project from the main menu. Name the project ComputerSales.
- Create an ERD by selecting File > New Diagram > Database Modeling > Entity Relationship Diagram from the main menu.
- Enter Physical Database Design as the name of diagram.

- Select entity from the toolbar to create an entity.

- Drag to diagram to create an entity. Enter Customer as the name of entity.

- To add column to the entity, right-click on the entity and select New Column from the pop-up menu.

- Enter customer_id as the name of column.
- To specify the column as primary key, right-click on the column and select Include in primary key from the pop-up menu.

- Move the mouse pointer over the entity, press on the One-to-Many Relationship -> Entity relationship icon.

- Drag out to an empty space to create an entity named Addresses.
- You can also create column through the specification dialog. To open the specification dialog, right-click the entity and select Open Specification... from the pop-up menu.

- Select the Columns tab, and click Add....

- Enter the column information and click OK to confirm.

- You also can specify the column as primary key by selecting the Primary Key property.

- Click OK.
- Column is added.

- Let's repeat the previous steps to complete the ERD.

- Let's configure the database configuration. Select Tools > Database > Database Configuration... from the main menu.
- Select Oracle from the database list.

- Click ... to specify the Oracle JDBC jar file location.

- Select the Oracle JDBC driver file
- Fill in the information of the database to reverse, and click Test Connection to verify the connection. Click Next.

- Now it's time to generate database. Select Tools > Database > Generate Database... from the main menu.
- In the Database Code Generation dialog box, customize the database generation.
- By default, Export to database is unchecked, check it to export the entities to the database.

- Press OK to start the generate process.
- Let's check with the Oracle Web Object Browser to verify the generation.

Trademark Disclaimer
Oracle is U.S. registered trademark of Oracle Corporation