DB Lecture-4
DB Lecture-4
Lecture 4
Data Modeling Using the
Entity-Relationship (ER) Model
Lecture objectives
1
10/23/2024
1. Database
Development
Process
DFD
Sequence
……..
Nontechnical
User
Application Programs
© 2023 by Prof. Manal Abdel-Kader Abdel-Fattah 4.3
2
10/23/2024
❖ Conceptual schema
❖ Conceptual design.
❖ Description of data requirements.
❖ Includes detailed descriptions of the entity
types, relationships, and constraints.
❖ Transformed from high-level data model into
implementation data model.
3
10/23/2024
3. ER Model Concepts
Entities
❖ Entity: is a thing in the real world with an
independent existence
❖ An entity may be a person, a place, an object, an
event, or a concept in the user environment
about which the organization wishes to
maintain data
❖ Examples:
❖ An object with a physical existence (person, car,
employee).
❖ An object with a conceptual existence (a job, or
a university course).
4
10/23/2024
An Entity…
❖ SHOULD BE:
❖ An object that will have many instances in the
database.
❖ An object that will be composed of multiple
attributes.
❖ An object that we are trying to model
Entities
❖ Entity type – a collection of entities that share
common properties or characteristics.
❖ Entity instance – A single occurrence of an
entity type.
10
5
10/23/2024
❖ Strong entity
➢ exists independently of other types of entities
➢ has its own unique identifier, identifier underlined
with single line.
❖ Weak entity
➢ dependent on a strong entity (identifying
owner)…cannot exist on its own.
➢ does not have a unique identifier (only a partial
identifier).
➢ entity box and partial identifier have double lines.
11
Name
DEPENDENT Age
DependentOf
EID
Name EMPLOYEE
Phone
12
6
10/23/2024
Attributes
❖ Attribute: property or characteristic of an entity or
relationship type (used to describe an entity).
❖ Name should be a singular noun
❖ Name should be unique
❖ Examples:
❖ An “Employee” entity may be described by the
employee’s name, age, address, salary, and job
❖ A “Student” entity may be described by the
student’s name, student number, current address,
permanent address, birthDate, sex, class, and
phone
13
Attributes
❖ Classifications of attributes:
1. Required versus Optional Attributes
2. Simple versus Composite Attribute
3. Single-Valued versus Multivalued Attribute
4. Stored versus Derived Attributes
5. Complex Attributes.
6. Identifier (key) Attributes
14
7
10/23/2024
15
The address is
broken into
component parts
16
8
10/23/2024
17
18
9
10/23/2024
5) Complex Attribute
❖ Example
{Address_phone(
{Phone(Area_code,Phone_number)},
Address(Street_address(Number,Street,
Apartment_number),City,State,Zip) )}
19
20
10
10/23/2024
Notation Summary
21
22
11
10/23/2024
Age
23
24
12
10/23/2024
25
Thank you
26
13