
Lectures / LECTURE 2
.pdfLECTURE 2
Conceptual Modeling
IITU, ALMATY, 2016 DATABASE DESIGN
Lyudmila Kozina, senior lecturer
From previous lecture
•Subject Area Analysis
•Conceptual Modeling
–ER diagram
•Logical Modeling
•Physical Modeling
Database Design Formalisms
1.Entity-Relationship model (ER):
–More relational in nature.
–Very widely used
2.Object Definition Language (ODL):
–Closer in spirit to object-oriented models (e.g. Java)
–Will not be covered
Both can be translated
4
Object Definition Language
Class declarations
Interface < name > { elements = attributes, relationships, methods }
Element Declarations attributes ( < type > : < name > );
relationships ( < rangetype > : < name > );
Example
Type Date Tuple (year, day, month) Type year, day, month integer
Class Manager
attributes{id : string unique name : string phone : string
set employees : Tuple ( [Employee], Start_Date : Date )}
Class Employee
attributes{id : string unique name : string Start_Date : Date manager : [Manager]}
5
Conceptual Modeling
ER model (entity-relationship model) is a way of graphically representing the logical relationships of entities (or objects) in order to create a database.
The ER model was first proposed by Peter Pin-Shan Chen of Massachusetts Institute of Technology (MIT) in the 1970s.
To design an ER model you should know …
•Entities
•Attributes
•Relationships

Attribute |
Entity (table, |
(column) |
relation) |
Students
stud_id lname |
fname |
bdate |
tel |
001
002
003
004
Tuples (rows)

First notation - Chen’s notation
• Entities (rectangle shape)
• Attributes (oval shape)
• Relationship (rhombus shape)
Example
• Entities:
Students
Teachers
Subjects
• Attributes
Students (stud_id, f.name, l.name, phone number, email, group)
Teachers (teach_id, f.name, l.name, phone number, email, department)
Subjects (id, name, credits)

ER-diagram with Chen’s notation
|
|
|
|
|
|
|
|
group |
|
name |
|
||
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Students |
learn/ teach |
department |
name |
Teachers |
||
|
|
|
learn |
teach |
Subjects
|
|
|
|
|
|
|
|
credits |
|
id |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
name |
|
|
|||
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|