You are on page 1of 26

Database Foundations

4-1
Oracle SQL Developer Data Modeler

Copyright © 2015, Oracle and/or its affiliates. All rights reserved.


Road Map
You are here

Converting a
Logical Model
Oracle SQL
to a Relational
Developer
Model
Data Modeler

DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 3
Oracle SQL Developer Data Modeler
Objectives

This lesson covers the following objectives:


• Use Oracle SQL Developer Data Modeler to create:
– Entities, attributes, and UIDs with correct optionality and
cardinality
– Supertype and subtype entities
– Arc, hierarchical, barred, and recursive relationships

DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 4
Oracle SQL Developer Data Modeler
Introduction to Oracle SQL Developer Data
Modeler

• Oracle SQL Developer Data Modeler offers a range of


data and database modeling capabilities, enabling you
to:
– Capture business rules and information
– Create process, logical, relational, and physical models
– Store metadata information in XML files
– Synchronize the relational model
with the data dictionary

DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 5
Oracle SQL Developer Data Modeler
Oracle SQL Developer Data Modeler
Interface: Example Overview

Main
Menu

Object Browser Display Window Navigator

DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 6
Oracle SQL Developer Data Modeler
Building an ERD by Using Oracle SQL
Developer Data Modeler

d. Set the source


and target
c. Define values for the
relationship relationship.
b. Create between
attributes entities.
a. Create and UIDs.
entities.

DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 7
Oracle SQL Developer Data Modeler
Case Scenario: An Introduction
Sean, I would like you to create a simplified
library database to manage the number of
reference books in our department. As a first
step, can you build a logical model using
Oracle SQL Developer Data Modeler that we
Faculty have installed in our student machines?

Glad to. I’ll start by identifying the entities and


their attributes. After that, I can use the
Oracle SQL Developer Data Modeler tool to
build the logical model.
Student

DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 8
Oracle SQL Developer Data Modeler
Case Scenario: Identifying Entities

Books
Authors

Members Publishers

Book
Transactions

DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 9
Oracle SQL Developer Data Modeler
Building an Entity Relationship Diagram
1
Navigate to the
Logical Tab
2
Create an Entity
3
Add Attributes to
the Entity
4
Set the Unique
Identifiers
5
Define the Relationship
Between the Entities
DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 10
Oracle SQL Developer Data Modeler
Building an ERD: Step 1

1. Navigate to the Logical tab.

DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 11
Oracle SQL Developer Data Modeler
Building an ERD: Step 2

2. Create an entity.
a
b

DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 12
Oracle SQL Developer Data Modeler
Building an ERD: Step 3

3. Add attributes to the entity.

b
a
c

DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 13
Oracle SQL Developer Data Modeler
Editing the Attribute Properties

DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 14
Oracle SQL Developer Data Modeler
Building an ERD: Step 4

4. Set the UID.

DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 15
Oracle SQL Developer Data Modeler
Building an ERD: Step 5

5. Define the relationships between the entities.


a

DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 16
Oracle SQL Developer Data Modeler
Building an ERD: Step 6

6. Set the source and target values for the relationship.


a

b c

DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 17
Oracle SQL Developer Data Modeler
Case Scenario: Entity Types

Sean, I was wondering if we could include new types of


membership categories such as:
• Student Membership
• Faculty Membership
• Corporate Membership
Faculty

This can definitely be achieved. I can create a common entity


that would hold membership details that are common to all
the three membership categories. This would be a supertype
entity. The specific membership categories would inherit the
properties of the supertype entity, in addition to their own
specific attributes. Hence, the specific membership category
would be a subtype entity.
Student

DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 18
Oracle SQL Developer Data Modeler
Creating the Supertype Entity
MEMBERS Supertype

FACULTY STUDENT CORPORATE


Subtype

DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 19
Oracle SQL Developer Data Modeler
Creating the Arc Relationship
a

DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 20
Oracle SQL Developer Data Modeler
Creating the Hierarchical Relationship

1:N Relationship

DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 21
Oracle SQL Developer Data Modeler
Creating the Barred Relationship

Identifying
Relationship

DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 22
Oracle SQL Developer Data Modeler
Creating the Recursive Relationship

• In a relationship, if the same entity participates more


than once, it is termed a recursive relationship.

Recursive
Relationship

DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 23
Oracle SQL Developer Data Modeler
PROPERTIES

On passing, 'Finish' button: Goes to Next Slide

On failing, 'Finish' button: Goes to Next Slide

Allow user to leave quiz: At any time

User may view slides after quiz: At any time

Show in menu as: Multiple items


Summary

In this lesson, you should have learned how to:


• Use Oracle SQL Developer Data Modeler to create :
– Entities, attributes, and UIDs with correct optionality and
cardinality
– Supertype and subtype entities
– Arc, hierarchical, barred, and recursive relationships

DFo 4-1 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 25
Oracle SQL Developer Data Modeler

You might also like