tutorial
basic
Draw a Basic Diagram
Draw a Basic Diagram
In this tutorial we'll learn how to create a very simple diagram having a parent table and to child table inheriting the pk as referential constraint.
Autolayout feature will be demonstrated along side the capability to generate ddl code from the diagram.
create a new diagram
create a new diagram
- click on Create Document
- provide a document name and tap on confirm
drag tables on the canvas
drag tables on the canvas
- in the new diagram, click on the + button on right top corner
- tap and old on the entity object on the palette until the palette's pane disappears
- drag the object on the canvas
- repeat the same task for 3 times
check diagram validity
check diagram validity
- click on the triangle icon on the right side of the toolbar (there is a 3 badge on top of the icon)
- a panel opens on the bottom of the screen prompting 3 validation error, all stating that "the table name is empty"
- drag to the panel to the bottom to close it
fix validation error
fix validation error
- tap on the entity header in order to edit the name
- do the same on an other table writing "ENTITY B" but left the third invalid in order to approach the same task alternatively in the next step
edit an invalid table
edit an invalid table
- instead of writing the name on the table header, click on the triangle icon again, where the badge is now having value 1
- click on the pencil icon along side the row providing the validation error
- in the table edit form, provide the table name (ENTITY C) in the Logical Name field (observe like the Physical Name is evaluated automatically)
draw a referential constraint
draw a referential constraint
- tap on a table in order to display the table highlight
- on the highlighted table, tap again in order to show the available tools
- drag on the arrow on the top side of ENTITY B and drop a connection id PK column of ENTITY A (parent table)
- provide a name for the exported column in ENTITY B table and tap confirm
draw a 1:1 referential constraint
draw a 1:1 referential constraint
- tap on a table ENTITY C in order to display the table blue border highlight
- on the highlighted table, tap again in order to show the available tools
- drag on the arrow on the left side of ENTITY C and drop a connection id PK column of ENTITY A (parent table)
- choose the exiting constraint column id
- identifying switched automatically on
layout the diagram
layout the diagram
- tap on the organize icon on the toolbar (third from the right)
- tap on zoom to all in order to show the overall diagram in the canvas
- tap layout to perform automatic layout of the diagram
generate the ddl
generate the ddl
- tap on the export icon on the toolbar (second from the right)
- tap on hive export
- set export option properly
- tap on code button (top right)
- preview the generated code and export everywhere to everyone