0% found this document useful (0 votes)
73 views21 pages

E-R Diagrams: BITS Pilani

The document discusses entity relationship (ER) diagrams and their basic notation. It defines entities as objects, people, places or concepts about which an organization maintains data. Attributes are properties of entities like name and address. Relationships represent interactions between entities and can have attributes. Cardinality specifies the number of entities that can be associated in a relationship, and degree refers to the number of entity types in a relationship. The document provides examples and explanations of these ER diagram concepts.

Uploaded by

Sayantan Paul
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)
73 views21 pages

E-R Diagrams: BITS Pilani

The document discusses entity relationship (ER) diagrams and their basic notation. It defines entities as objects, people, places or concepts about which an organization maintains data. Attributes are properties of entities like name and address. Relationships represent interactions between entities and can have attributes. Cardinality specifies the number of entities that can be associated in a relationship, and degree refers to the number of entity types in a relationship. The document provides examples and explanations of these ER diagram concepts.

Uploaded by

Sayantan Paul
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
You are on page 1/ 21

BITS Pilani

Pilani Campus

E-R Diagrams

Deepak Saxena
Department of Management
BITS Pilani
Pilani Campus [email protected]
9/8/2021 2
BITS Pilani, Pilani Campus
Basic ER Notation: Entity

• An entity is a person, a place, an


object, an event, or a concept in the
user environment about which the
organization wishes to maintain
data.
• Examples
– Person: EMPLOYEE, STUDENT,
PATIENT
– Place: STORE, WAREHOUSE,
STATE
– Object: MACHINE, BUILDING,
AUTOMOBILE
– Event: SALE, REGISTRATION,
RENEWAL
– Concept: ACCOUNT, COURSE,
WORK CENTER

9/8/2021 3
BITS Pilani, Pilani Campus
Entity Type vs Instances

Entity Type Entity Instances


9/8/2021 4
BITS Pilani, Pilani Campus
Strong vs Weak Entity

• Strong entity type


– An entity that exists independently of other entity types.
• Weak entity type
– An entity type whose existence depends on some other entity
type.

9/8/2021 5
BITS Pilani, Pilani Campus
Basic ER Notation: Attribute

• A property or characteristic of
an entity or relationship type
that is of interest to the
organization.
• Examples
– STUDENT: Student ID,
Student Name, Home
Address, Phone Number,
Major
– AUTOMOBILE: Vehicle ID,
Color, Weight, Horsepower
– EMPLOYEE: Employee ID,
Employee Name, Payroll
Address, Skill

9/8/2021 6
BITS Pilani, Pilani Campus
Attribute: Required vs Optional Attribute

9/8/2021 7
BITS Pilani, Pilani Campus
Various Considerations

• Simple vs Composite
– Simple (Atomic): Student
ID
– Composite: First Name,
Middle Name, Last Name
• Single-valued vs
Multivalued
– Single-valued attribute can
store only one value
– Multivalued attribute may
take on more than one
value

9/8/2021 8
BITS Pilani, Pilani Campus
Various Considerations

• Stored vs Derived
– Stored: recorded directly
– Derived: Calculated based
on other attributed

• Identifier Attributes
/Primary Key
– Is underlined
– Simple
– Composite

9/8/2021 9
BITS Pilani, Pilani Campus
Modeling Relationships

• An association representing an interaction among the instances of


one or more entity types
• Usually a verb

9/8/2021 10
BITS Pilani, Pilani Campus
Relationship Instances

9/8/2021 11
BITS Pilani, Pilani Campus
Relationship Attributes

Conceptual

Logical
Associative Entity
9/8/2021 12
BITS Pilani, Pilani Campus
Relationship Properties

• Cardinality: A rule that specifies the number of instances


of one entity that can (or must) be associated with each
instance of another entity.
– E.g. A copy of a book can be issued by zero or one student.
• Degree: The number of entity types that participate in a
relationship.
– E.g. Issuance of the book happens when a book is issued to a
student (i.e. degree 2).

9/8/2021 13
BITS Pilani, Pilani Campus
Relationship Cardinality

9/8/2021 14
BITS Pilani, Pilani Campus
Cardinality Examples

9/8/2021 15
BITS Pilani, Pilani Campus
Explain

A patient has recorded one or more


patient histories.

9/8/2021 16
BITS Pilani, Pilani Campus
Explain

One or more employees are assigned


to zero or more projects.

9/8/2021 17
BITS Pilani, Pilani Campus
Relationship of different degrees

Unary Relationship

Binary Relationship

9/8/2021 18
BITS Pilani, Pilani Campus
Relationship of different degrees

Ternary Relationship

9/8/2021 19
BITS Pilani, Pilani Campus
Case Example: Data
model for Pine Valley
Furniture Company

9/8/2021 20
BITS Pilani, Pilani Campus
At times…

9/8/2021 21
BITS Pilani, Pilani Campus

You might also like