0% found this document useful (0 votes)
3 views

Data Moduler Tutorial

Uploaded by

skfeath.coding
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Data Moduler Tutorial

Uploaded by

skfeath.coding
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Data Modeler Tutorial

1. Execute Data Modeler by clicking View > Data Modeler > Browser.

2. Browser pane will be opened at the bottom-left of the window and then expand Untitled_1, select
Logical Model, right click on it and then click Show. The interface for building E-R model will be
opened.

3. This figure shows the interface. Look at the highlighted options. You are going to use them soon
to build your E-R model.

(Database Systems Lab) 1 Dr. Mohammad Rezwanul Huq


4. First, you need to set domains for attributes in your entities. Domains are set of permitted values
for an attribute. Click Tools > Data Modeler > Domains Administration.

5. It will open Domain Administration window as shown in the figure. Click Add then give the domain
name and set appropriate parameters. After that, click Apply.

(Database Systems Lab) 2 Dr. Mohammad Rezwanul Huq


6. Once done, the following figure will be shown. Add few more necessary domains.

(Database Systems Lab) 3 Dr. Mohammad Rezwanul Huq


7. After adding necessary domains, click Save on Domain Administration window. Domains will be
saved for future use.

8. Now, you are ready to create your first entity. Click on the icon as shown in the following figure.

9. Now click on the interface. It will generate the following window to edit the entity.

(Database Systems Lab) 4 Dr. Mohammad Rezwanul Huq


10. Write the name of the entity ‘Instructor’. Then from the left side pane, click on Attributes. The
following window will be generated.

(Database Systems Lab) 5 Dr. Mohammad Rezwanul Huq


11. Click on the + icon to create an attribute. Type the name ‘id’. Choose the domain ‘Identifier’ and
check the box Primary UID (Primary Identifier/key) and then click Apply. This is how, create two
other attributes name and salary. After that, click Ok.

12. Clicking Ok will create your first entity set Instructor. It is shown in the following figure.

(Database Systems Lab) 6 Dr. Mohammad Rezwanul Huq


13. Following the same process, create another entity set Student which has three attributes – id
(Identifier), name (Name) and tot_cred (OtherNumeric). After creating these two entity sets, the
interface would look like the following.

14. Next, you need to create a relationship between these two entity sets. Here, an instructor can
have many students as advisee and a student has at most one instructor as advisor. So, you need
to use one to many relationship from Instructor to Student. Choose the highlighted icon in the
previous figure and drag from instructor to student entity set. It would open a new Relation
properties window like the following figure.

(Database Systems Lab) 7 Dr. Mohammad Rezwanul Huq


15. Give the name of the relation. Choose Target Key and uncheck the Source Optional check box.
Then click OK. The following figure will be displayed.

16. It is possible to change the cardinality of the relationship by changing the parameter in the
Relation properties window.
17. Save the logical model now. Right click on Untitled_1 and then choose Save Design.

18. It would open another window. Give it a name ‘university’ and click ok. The model is saved.
19. Now click on the highlighted icon in the previous figure to transform the logical model into
Relational Model (Schema Diagram). The following window will open. Click Engineer.

(Database Systems Lab) 8 Dr. Mohammad Rezwanul Huq


20. The logical model will be transformed into Relational Model as shown below.

(Database Systems Lab) 9 Dr. Mohammad Rezwanul Huq


21. Now, click on the highlighted icon ‘Generate DDL’ to automatically generate the SQL statements
to create the tables based on the schema diagram. The following window will be opened.

22. Select target database and then click Generate. It will open the following window. Click Ok.

(Database Systems Lab) 10 Dr. Mohammad Rezwanul Huq


23. DDL (Data Definition Language) script will be generated as per the following figure. You can save
the script by clicking save.

(Database Systems Lab) 11 Dr. Mohammad Rezwanul Huq

You might also like