You are on page 1of 32

TOAD Reference Manual

Creation Of Physical Model


 Click File -> New -> Model

 Model Wizard Opens


 Click Physical Model Tab
 Select The Target Database -> Oracle 10g
 Give The Model Name

 Application Window Opens With a Empty Work Space


Creation Of User
 Click Model -> Users

 Users Wizard Opens.

 Add The Number Of Users in The Wizard According The Users in The User
Names Document.

 Click Apply
 Click on The User And Click Edit
 User Properties Wizard Opens
 Click On General Tab

 Give the Name Of The User in The Caption Field

 Give The Password Same As User Name


 Click Apply

 Select The Next User In The List Box Available

 Provide The Required Details Of The User

 Click Apply
Creation Of Entities
 Click Objects -> Entities

 Entity is Found in The Work Space

 Right Click On The Entity And Click Edit OR Double Click The Entity.
 Entity Wizard Opens
 Click General Tab
 Give The Name Of The Entity In The Captions Field

 Assign The User In The User Field Box


Note: All the Users Will Be Available in the User List Box

 Click Apply Button


Addition Of Attributes To Entities
 Click Attributes Tab -> Add

 Add Attributes According To The Table And Do Not Add FK OR PFK OR


CFK Columns.
 Click On The Attribute And Click Edit
 Attribute Wizard Opens
 Click General Tab
 Give The Column Name in the Caption Field, Data Type in The Data
Type Field And Length Of The Field in The Length Field.
 Click Apply
 Go To Attribute List Box And Select Another Attribute And Give The
Details Of The Attribute.

 Fill Details Of All The Attributes Of The Table.


 Click OK.
Addition Of Primary Keys
 Click Keys Tab in Entity Wizard

 By Default We Find One Key for Every Table


 Click On The Key And Click Edit Button
 Key Properity Wizard Opens
 Click On General Tab
 Give The Constraint Name in The Caption Field
 Click Apply
 Click Attributes Tab

 Select The Primary Key Attributes

 Press Arrow Button To Get Selected

 Click Apply
 Click OK
 Primary is Added To The Table, Check in The Table

 Add Unique Constraint To All The Primary Key Columns


Participating Composite Primary Keys.
Adding Not Null Keys
 Click Entity Properties ->Attributes Tab
 Select The Attribute Which Has Not Null Constraint And Click Edit
 Attribute Properties Opens
 Check The Not Null Check Box

 Not Null Constraint Tab Appears, Click On The Tab


 In The Constraint Name Field Give The Name Of Not Null Constraint

 Click Apply
Adding Unique Constraint
 Click Entity Properties -> Attributes Tab
 Select The Attribute Which Has Unique Constraint And Click Edit
 Attribute Properties Opens
 Check The Unique Check Box

 Click Ok
 The Screen Navigates Back To Entity Proprieties
 Click On Keys Tab
 We Find The Unique Column
 Click On Unique Column

 Click Edit
 Key Properties Opens
 Select General Tab
 Give The Constraint Name in The Caption Field

 Click Ok
Adding Check Constraints To Attributes
 Click Entity Properties -> Attributes Tab
 Select The Attribute Which Has Check Constraint
 Click Edit
 Click Check Constraint Tab in Attribute Properties

 Click Add
 Add The Number of Check Constraints Available For The Attribute

 Click Apply
 Select The Check Constraint And Click Edit
 Check Constraint Properties Opens
 Click General Tab And Give The Constraint Name in The Caption Field

 Click The SQL Tab


 Enter The Check Code Of The Attribute
 Click On The Notes Tab And Give The Validation Description.

 Click Ok
 Screen Navigates Back To Attribute Properties
Note: Follow a Sequence Number for Naming Check Constrains For a
Particular Attribute

 Click OK
Note: Check The Sql Code Of The Table in Entity Properties -> SQL
Preview And Check The Check Code (especially Syntax Of SQL Code Given
By You).

Adding Check Constraint To Entity


 Click Entity Properties -> Check Constraints
 And Follow The Same Steps Of The Adding Attribute Check
Constraints.
Adding Triggers To Entities
 Click Entity Properties -> Triggers

 Click Add
 Add Number Of Triggers You Want To Add To The Entity

 Click Apply
 Select The Trigger And Click Edit
 Trigger Properties Opens
 Select General Tab And Give The Name Of The Trigger in The Caption
Field. E.g. TRG_TableName_ColumnName

 Check The Generate SQL Only Check Box.


 Copy The Sql Code Of The Trigger Which You Have Done in SQL Plus
and Paste in The SQL Tab

 Click Apply And Click Ok


Note: Check The Sql Code Of The Table in Entity Properties -> SQL
Preview And Check The Check Code (Especially Syntax Of SQL Code
Given By You.)
Add Relationships
Types Of Relationships:
 Identifier Relationship: The Relationship in Which the Identifier
Column of the Parent Table (Primary Key Column) is acting as a Partial
Identifier Column in The Child Table (PFK Columns) is Called As Identifier
Relation.
 Non Identifier Relationship: The Relationship in Which The Identifier
Column Of The Parent Table(PK Column) is Acting As Non Identifier
Column in The Child Table (FK Columns) is Called As Non Identifier
Relation.
 Identify The Relation Between The Tables
 Click On Objects -> Relationship OR Non Identifying Relationship

 Select The Relation


 Click On The Parent Entity And Drag The Relation To The Child
Table And Release The Mouse Button.
 A Physical Relation Will Be Established Between The Two Entities
 For A Self Relation Double Click On The Parent Table
Note: For Identifier Relationship There Exists a Straight-line
For Non Identifier Relationship There Exists a Dotted Line
 Name the Relationships with the Foreign Key Constraint Names
E.g. Identifier Relation CNS_ChildTableName_ChildColumnName_PFK
NonIdentifier Relation
CNS_ChildTableName_ChildColumnName_FK
 Right Click On The Relationship And Click Edit OR Double Click
 Go To General Tab And Provide The Name Of The Relation in The
Caption Field

 Click Apply
 Define The Referential Integrity Of The Relation
 Click Referential Integrity Tab
 Select The Parent Referential Integrity (Set Null, Cascade)

 Click Apply
 Check The SQL Code Of The Relation in The SQL Preview

 Click Ok
 Relationship Property Wizard Closes
Assign Permissions
 Assign Privileges To The Entity, If The Parent Entity And Child Entity
Are in Different Users.
 Double Click On The Parent Entity
 Entity Properties Wizard Opens
 Click On Permissions Tab

 Add A Privilege And Click Apply


 Click On The User (User Group) Column Press F2
 Select The Child User From The List Of Users Available
 Click Apply
 Select The Permission
 Click Edit
 Permission Propriety Wizard opens
 Select The References Status Column Press F2
 Select Grant From The List

 Click Apply And OK in The Permission Propriety Wizard


 Click Apply On The Entity Properties Wizard
 Click OK
Model Merge
 Merge All The Developers Models in To One Model Using Model Merge
Option.

 Open All The Models Of The Developers in The TOAD Data Modeler

 Activate The Source Model (Model To Be Merged).

 Click Model -> Simple Model Merge

 Merge Wizard Opens

 Select The Target Model (Model in To Which Source Have To Be


Merged).

 Click Merge

 After Merging Process is Finished, The Target Model is Activated.


 Check The Entities And Users After Merging in The Target Model.
Verification Of Model
 Click Model -> Verify Model

 Model Verification Wizard Opens


 Select What To Verify Tab
 Select Entities, Relationships

 Click Verify
 The Errors, Warnings And Hints Will Be Available in The Message Box
Below
 Check Those Errors And Warnings And Rectify Them Till The Errors
Are ZERO

 Arrange the Model Without Crossings And Save The Final Model
Generation Of DDL Script For The Model
 Open The Model In The Toad Data Modeler
 Click Model -> Generate DDL Script

 DDL Script Generation Wizard Opens

 Click On What To Generate Tab


 Select The Location Of SQL File And Provide The File Path Of The
Generated SQL File And Provide The Name Of The File.

 Select The Drop And Create Option


 Select Only Entities, Permission To Objects And Relationships From
The Objects List
 Select The Options Shown in The Images
 Click Generate
 The File Gets Generated in The File Location
 Check The File And Open And Check The Code
 Then Run The File in The Main User Of The Project.

You might also like