Database Systems!: Data Model
Database Systems!: Data Model
Data Model
Dr. Seema Jehan
Outline!
• Data Modeling
• Process Modeling
• XML model
• NoSql Model
Major Topics of the Course!
• Data Modeling
• Process Modelling
• Database Efficiency
Data Modeling!
• The model represents a perception of structures
of reality.
Reality
AGENT! CUSTOMER!
! !
! 1
CUST_CODE!
AGENT_CODE! CUST_LNAME!
AGENT_LNAME! CUST_FNAME!
AGENT_FNAME! CUST_PHONE!
AGENT_PHONE! M
AGENT_CODE!
The Relational Model!
• Main reason for rise of the relational model is its structured
query language (Sql)
CUSTOMER! 1
M
INVOICE!
Relationships!
• To describe associations among data.
• Most relationships describe associations between two entities.
• Three types of data relationships exist in ER modelling:
• One-to-many (1:M)
• Many-to-Many (M:M)
• One-to-One (1:1)
• The name of the relationship is usually an active or passive verb.
• Example: a PAINTER paints many PAINTINGS
Example!
• Many-to-many:
• An employee learns many job skills, and each job skill may
be learned by many employees.
STUDENT! M
N
CLASS!
Example (contd.)!
• One -to-one:
• A retail company’s structure requires each store to be
managed by one employee.
A! 1
1
B!
Relationships - ER Notations!
• The Chen notation, the crow’s foot notation, class
diagram notation
The Object Oriented Model!
• A data model whose basic modelling structure is an object.
• An object is an abstract representation of a real-world
entity that has a unique identity, embedded properties, and
the ability to interact with other objects and itself.