Lecture 3
Lecture 3
LECTURE 3
DATA MODELS:
ENTITY RELATIONSHIP MODEL
HUMA TABASSUM
DEPARTMENT OF COMPUTER SCIENCE & INFORMATION TECHNOLOGY
NED UNIVERSITY OF ENGINEERING & TECHNOLOGY
DATA MODEL
• A model is the representation of reality that retains only selected
details.
• A data model is a collection of conceptual tools for describing data
(about entities, activities, events), data relationships, data semantics,
and integrity constraints.
• Purpose is to represent data and make the data understandable.
• DDL is too low-level to be used as an easily understandable
representation of data for many users.
• Therefore, data model provides a high-level description of data requirements
of an organization.
• Limitations?
• Semantics
Components of a Data Model
• UML Notation
• Martin Style
• Candidate Key: A super key whose proper subset is not a super key.
• Empno – 1 key (simple)
• {Roll No., Batch, Dname} – 1 key (composite)
• Has two properties
• Uniqueness
• Irreducibility
• An ES can have more than one C.Ks.
• Primary Key: The C.K. that is chosen by the db designer as the
principal means of identifying an entity in an ES.
• Can never be null.
• Should be chosen so that attributes do not change frequently.
• P.K. can be simple or composite.
• There are similarities between these ESs as they have several attributes that are
conceptually the same across the three ESs: namely, the id, name, and salary
attributes.