Professional Documents
Culture Documents
Data Modeling
E-R Diagrams - Basics
Guidelines
Databases
ER-Models
February 8, 2010
Example: University
Data Model
Conceptual schema
Students(sid: string, name: string, login: string, age: integer)
Courses(cid: string, cname:string, credits:integer)
Enrolled(sid:string, cid:string, grade:string)
Physical schema
Relations stored as unordered files.
B+ tree index on first column of Students.
External Schema (View)
CourseInfo(cid:string,enrollment:integer)
Michael T. M. Emmerich & Paul Breukel Databases
Introduction/Overview
Data Modeling
E-R Diagrams - Basics
Guidelines
Requirements Analysis
Informal description of the data objects to be stored in the
database
List of integrity constraints and relations between the data
objects
Data Modeling (ER Diagram)
Formal specification of data model and constraints in a
human-understandable, graphical way
Translation into relational schema using Data Definition
Language of SQL (DDL)
Schema Refinement, Tuning (Indexes, Query optimization)
Application programming on top of Database using SQL
Data-Manipulation Language (DML), also definition of views
E-R Diagrams
Relationship (sets)
(e1 , . . . , en , a1 , . . . am ) ∈ E1 × · · · × En × A1 × · · · × Am
Roles
Key Constraints
Key Constraints
Key Constraints
Instances of relationship sets can be denoted as hypergraphs
Example: Instances of binary relationship sets fulfilling
different kinds of key-constraints:
Example 1
Example 2
Example 3
Weak entities
’is-a’ Hierarchies
Example 3
Aggregation
Summary