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.
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.
5. Right click on the diagram’s background and select Open Specification… from the pop-up menu.
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.
8. As a result, schema is applied on the entities as shown below:
9. Next, create another model. Right click on project root node and select Model > New Model… from the pop-up menu.
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.
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:
How to try the sample
Download Transaction and then unzip it to get the .vpp file.
Leave a Reply
Want to join the discussion?Feel free to contribute!