Entering Sample Table Records for Entities

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.

Selecting entity
Selecting entity

Enter the data in the editor. Double click on a cell to start editing. Click Enter to end editing.

Edited sample data
Edited sample data

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.

Selecting FK value
Selecting FK value

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.

Selecting record
Selecting record

Removing a record

To remove a record, select the record you want to remove and click  at the top right of the editor.

Validating records

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.

Message appear when something goes wrong
Message appear when something goes wrong

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.

Setting the Generate Sample Data option
Setting the Generate Sample Data option

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.

Related Resources

The following resources may help you to learn more about the topic discussed in this page.

 
6. Using Auto Column Table of Contents 8. Modeling Database View
 

Technical Support

Have technical issues or suggestions? Please contact Visual Paradigm Support Team.

Sales Support

Have questions related to registration, licensing or payment? Feel free to contact Visual Paradigm Sales Team.

Discussion Forum

Share your suggestions of opinions at VP Discussion Forum.