0% found this document useful (0 votes)
6 views25 pages

Object Based Logical Model (SQL)

This document provides an overview of the Object-Based Logical Model and the Entity Relationship (ER) Model, including key concepts such as entities, relationships, and attributes. It explains the diagrammatic techniques used to represent these components and discusses different types of relationships, including one-to-one, one-to-many, and many-to-many. Additionally, it covers the distinction between dependent and independent entities, as well as the concept of subtypes and their relationship to super types.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views25 pages

Object Based Logical Model (SQL)

This document provides an overview of the Object-Based Logical Model and the Entity Relationship (ER) Model, including key concepts such as entities, relationships, and attributes. It explains the diagrammatic techniques used to represent these components and discusses different types of relationships, including one-to-one, one-to-many, and many-to-many. Additionally, it covers the distinction between dependent and independent entities, as well as the concept of subtypes and their relationship to super types.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Object Based

Logical Model
ER Model

ORACLE
RDBMS
Objectives
In this lesson, you will learn :
▪ What is Object-Based Logical Model
▪ The Entity Relationship Model
▪ ER Diagrammatic Techniques

ORACLE
RDBMS
Object-Based Logical Model
▪ The ER model :

➢ Views the real world as a collection of objects or entities and the


relationship among them

➢ Has a corresponding diagramming technique

▪ The following diagram shows various components and depicts the


relationship between them
Attributes Attributes

END-DT
TITLE CODE
START-DT SEM#

COURSE TAUGHT SEMESTER

Relationship
ENTITIES
ORACLE
RDBMS
The ER Model
▪ An Entity :

➢ Is any object, place, person, or activity about which the data is


recorded

➢ Can be categorized as entity type and entity instance

▪ In the ER model diagramming technique, entities are named and


represented inside a box

▪ For example:

ORACLE
RDBMS
The ER Model
▪ Entity can be of the following types :

➢ Dependent entity:

✓ Depends on another entity for existence

✓ Is also called as a weak entity

✓ Independent entity:

✓ Does not depend on any other entity for existence

✓ Is also called as a regular entity

▪ The following diagram consists of an entity, OFFERING, which is


dependent on an entity, COURSE

Independent
Entity

Dependent
Entity

ORACLE
RDBMS
The ER Model
▪ Chen defined a relationship as “an association among entities”.

▪ A relationship is depicted as a diamond with the name of the relationship


type.

For example:

Relationship

ORACLE
RDBMS
The ER Model
▪ The following diagram represents the association of an entity with itself

STUDENT

SEMINAR

An entity associating with


itself can be a student giving
a seminar presentation to
other students.

ORACLE
RDBMS
The ER Model
▪ The following diagram represents multiple relationships between the
entities, TEACHER and STUDENT.

ORACLE
RDBMS
The ER Model
TRY OUT :

▪ The following statement has been extracted from a case presented by a


manufacturer regarding the maintenance of their data: “A supplier ships
certain parts”. Identify the entities mentioned in this statement, and their
relationship. Draw a diagram depicting the relationship

ORACLE
RDBMS
The ER Model
TRY OUT :

▪ SOLUTION:

➢ Entities: SUPPLIER, PARTS

➢ Relationship: SHIP or SUPPLIES

ORACLE
RDBMS
The ER Model
▪ There are three types of relationships:

➢ One-to-one

➢ One-to-many (or Many-to-one)

➢ Many-to-many

ORACLE
RDBMS
The ER Model
▪ The following diagram represents the one-to-one relationship between
DEPARTMENT and DEPARTMENT HEAD

For a particular DEPARTMENT there can be only one


DEPARTMENT HEAD.

ORACLE
RDBMS
Many to One
▪ The following diagram represents the many-to-one relationship between
STUDENT and MAJOR

A STUDENT can Register in only one course, but many


STUDENTs can register for a given MAJOR course.

ORACLE
RDBMS
The ER Model
▪ The following diagram represents the many-to-many relationship
between STUDENT and COURSE

A STUDENT can take many Coursers and many


STUDENTs can register for a given COURSE.

ORACLE
RDBMS
The ER Model
TRY OUT :
▪ What do the following ER diagrams represent?

ORACLE
RDBMS
The ER Model
TRY OUT :

▪ What do the following ER diagrams represent?

▪ Solution:

✓ Many students can work on many projects

✓ Many employees belong to only one department

ORACLE
RDBMS
The ER Model
TRY OUT :

Consider the following statement of a manufacturing company:

“A supplier supplies certain parts. A particular part is not necessarily


supplied by only one supplier. No supplier supplies only a single part.”

What type of relationship is this? Draw a diagram to depict the relationship

ORACLE
RDBMS
The ER Model
TRY OUT :

▪ Solution:

➢ Many-to-many relationship

ORACLE
RDBMS
The ER Model
▪ An attribute:

➢ Is a property of a given entity

➢ Is depicted as ellipses, labeled with the name of the property

▪ The following diagram shows the various attributes of the entity,


STUDENT.

ORACLE
RDBMS
The ER Model
TRY OUT :

▪ A manufacturer needs to maintain the following details about the supplier:

➢ Name

➢ Address

➢ Credit status

➢ Assigned code number

▪ Draw a diagram to depict this information

ORACLE
RDBMS
The ER Model
TRY OUT :

▪ A manufacturer needs to maintain the following details about the


supplier:

➢ Name

➢ Address

➢ Credit status

➢ Assigned code number

▪ Draw a diagram to depict this information

▪ Solution:

ORACLE
RDBMS
The ER Model
▪ A subtype :

➢ Is a subset of another entity

➢ Is always dependent on the super type for its existence

▪ The attributes of a super type apply to all of its subtypes

▪ The following diagram shows the relationship between super type


(COURSE) and subtypes (STANDALONE and SEMESTER)

The super type is connected to


the relationship with a line
containing a crossbar.

ORACLE
RDBMS
The ER Model
TRY OUT :

▪ There are two types of suppliers. One type of supplier allows credit,
while the other type insists on payment in cash before delivery. The
manufacturer wishes to maintain separate information on these two
types of suppliers. For the credit supplier, “credit period” and “credit
limit” have to be recorded. For the cash supplier, “date of payment” has
to be stored. Represent this information diagrammatically

ORACLE
RDBMS
The ER Model
TRY OUT :

▪ Solution:

ORACLE
RDBMS
Summary
▪ In this lesson, you learned that:

➢ Data models can be classified as:

✓ Object-based logical model

✓ Record-based logical model

➢ In the ER diagramming technique:

✓ Entities are represented as rectangles

✓ Relationships are represented as diamonds

✓ Attributes are represented as ellipses

➢ Relationships, whether many-to-many, one-to-many, or one-to-one


are represented symbolically

➢ Weak entities are represented by double-lined boxes

➢ Subtypes are connected to the super type by an unnamed


relationship, marked with a crossbar on top

ORACLE
RDBMS

You might also like