Visual Paradigm allows you to design your database with Entity Relationship Diagram (ERD) and finally generate the design to database as database schema. On top of the schema that will be generated, you can also specify default data to add to database upon database generation. Please note that although you can specify default data for conceptual, logical and physical data model, only entities under physical data model will be considered in database generation.
Entering default data
Default data has to be entered in the table record editor. To enable the editor, right click on the background of your ERD and select Show Table Record Editor or View Editor from the popup menu.
Then, select in diagram the entity you want to enter its default data.
Enter the data in the editor. Double click on a cell to start editing. Click Enter to end editing.
Selecting foreign key value
To select a foreign key value, click on the cell to popup the drop down menu and select the value from the menu.
Sometimes, you may be uncertain to what the foreign values represent. You can click on the … button to show the additional pane and select the proper record from the pane.
Removing a record
To remove a record, select the record you want to remove and click at the top right of the editor.
Record validation helps to verify the correctness of entered data. To validate, click at the top right of the editor.
If anything wrong is detected, the Message pane will popup and a message will appear in it.
Generating default data
In order for the sample records to be exported to database in database generation, you have to set the Generate Sample Data option in the Database Code Generation window.
Here is a description of the available choices:
- No – Not to generate sample table records
- Yes (With Auto Generated PK) – Generate sample table records. For primary keys, the value you entered in sample table records editor will be used.
- Yes (Without Auto Generated PK) – Generate sample table records. For primary keys, the value you entered in sample table records editor will be ignored, leaving the DBMS handle the generation of primary key.