Database Schema Design Using Entity-Relationship Approach

Database Schema Design

Using

Entity-Relationship Approach

(ER Approach or ER Model)

Tok Wang Ling

National University of Singapore

1

Topics

? Concepts/Constructs in ER Approach and diagram

o Cardinality vs. Participation Constraint

o Weak Entity Type, EX/ID Relationship Types, generalization

and specialization

o Some extensions: Aggregation, Multiple FDs Representation

? English Sentence Structure and ER Diagram

o self study

? ER Construct Notation Comparison

? Database Schema Design using ER Approach

? Translation of a (Normal Form) ER Diagram to a RDB

? A Normal Form for ER Diagram

ER Model

2

? ER approach was proposed by Prof. Peter Chen in TODS 1, 1976.

? Main Concepts:

- entity (i.e. object)

- relationship

- attribute

Person

Person

(entity)

Mary

(entity)

John

husband (role)

wife (role)

(relationship)

Brief ideas:

English correspondence

noun ? entity

verb ? relationship

Married to

Ref:

ER Model

?

?

?

?

Peter Chen paper TODS 1976

Elmasri&Navathe¡¯s book

Korth¡¯s book

Hawryzkiewycz¡¯s book

3

Entity: An entity is an object which exists in our mind

and can be distinctly identified.

Q: How to identify entities?

E.g. - Ng Hong Kim with NRIC S0578936I

- Account# 563978 of DBS Bank

- Car with car plate number SBG 3538P

Entity type

- Entities can be classified into different types.

- Each entity type contains a set of entities each

satisfying a set of predefined common properties.

E.g. Employee, Student,

Car,

House,

Bank Account

Q: What are the common properties of each of the above entity types?

ER Model

4

List of common entity types:

?

People: humans who carry out some function

Employees, students, customers

?

Places: sites or locations

Cities, offices, routes, countries

?

Things: tangible physical objects

Equipments, products, buildings

?

Organizations

Teams, suppliers, departments

?

Events: things that happen to some other entity at a given

date and time or as steps in an ordered sequence.

Employee promotions, project phases, account payments

?

Concepts: intangible ideas used to keep track of business or

other activities.

Projects, accounts, complaints

ER Model

5

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download