Database Design with Schema

Since VP-UML supports schema, users can make use of model to manage database. Users can develop ERDs under models, thereby, entities in different models can share the same name, but different schema. This page will demonstrate how to create model, how to create ERD under model and then how to apply schema.

1. In Model Explorer, right click on project root node and select Model > New Model… from the pop-up menu to create a new model.

Create a new model

Create a new model

2. In the Model Specification window, name the new model as HumanResources. Click OK button.

3. Right click on HumanResources model and select Sub Diagrams > New Diagram… from the pop-up menu. In the New Diagram window, select Database Modeling from the left hand side and create an Entity Relationship Diagram.

4. Create two entities on the diagram. Name one as Employee and another as Salary.

Create two entities

Create two entities

5. Right click on the diagram’s background and select Open Specification… from the pop-up menu.

Open specification

Open specification

6. When the Entity Relationship Diagram Specification window pops out, enter hr in Default schema. Click OK button.

7. Right click on the diagram’s background and select Apply Default Schema from the pop-up menu.

Select Apply Default Schema from the pop-up menu

Apply Default Schema

8. As a result, schema is applied on the entities as shown below:

Scheme is applied

Scheme is applied

9. Next, create another model. Right click on project root node and select Model > New Model… from the pop-up menu.

Create another model under project root node

Create another model under project root node

10. In the Model Specification dialog box, name the new model as Purchase. Click OK button.

11. Right click on Purchase model and select Sub Diagrams > New Diagram… from the pop-up menu. In the New Diagram window, select Database Modeling from the left hand side and create an Entity Relationship Diagram.

12. Create three entities on the diagram. Name entities as Customer, Employee and PurchaseOrder respectively.

Create three entities

Create three entities

13. Right click on the diagram’s background and select Open Specification… from the pop-up menu.

14. When the Entity Relationship Diagram Specification dialog box pops out, enter pur in Default Schema. Click OK button.

15. Right click on the diagram’s background and select Apply Default Schema from the pop-up menu.

16. As a result, schema is applied on the entities as shown below:

Scheme is applied

Scheme is applied

How to try the sample

Download Transaction and then unzip it to get the .vpp file.

55 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply