Sanjivani Rural EducationSociety’s
Sanjivani College of Engineering, Kopargaon-423 603
(An Autonomous Institute, Affiliated to Savitribai Phule Pune University, Pune)
NACC ‘A’ Grade Accredited, ISO 9001:2015 Certified
Department of Computer Engineering
(NBA Accredited)
Prof. Monika Agrawal
Assistant Professor
E-mail : agrawalmonikacomp@sanjivani.org.in
Contact No: 8770361037
Course:CO210
Database Management System
Lecture-02 Data Models
2.
Data Models
• DataModel gives us an idea that how the final system
will look like after its complete implementation.
• Data Models are used to show how data is stored,
connected, accessed and updated in the database
management system.
• Data models define how the logical structure of a
database is modeled.
It is classified into 3 types:
1. Conceptual Data Models -- ER Model
2. Representational Data Models – Relational Model
3. Physical Data Models- SQL
3.
1. Conceptual DataModel
• The conceptual data model describes the database at a very high
level and is useful to understand the needs or requirements of the
database.
• It is this model, that is used in the requirement-gathering process
i.e. before the Database Designers start making a particular
database.
• One such popular model is the entity/relationship model (ER
model).
4.
Entity-Relationship Model
• ERmodel stands for an Entity-Relationship model. It is a high-level data
model. This model is used to define the data elements and relationship for a
specified system.
• It develops a conceptual design for the database.
• We use the ER diagram as a visual tool to represent an ER Model. ER
diagram has the following three components:
Entities: Entity is a real-world thing. It can be a person, place, or even a concept.
Example: Teachers, Students, Course, Building, Department, etc. are some of
the entities of a School Management System.
Attributes: An entity contains a real-world property called attribute. This is the
characteristics of that attribute. Example: The entity teacher has the property
like teacher id, salary, age, etc.
Relationship: Relationship tells how two entities are related. Example: Teacher
works for a department.
6.
Advantages of ERModel
• Simple: Conceptually ER Model is very easy to build. If we
know the relationship between the attributes and the entities
we can easily build the ER Diagram for the model.
• Effective Communication Tool: This model is used widely
by the database designers for communicating their ideas.
• Easy Conversion to any Model: This model maps well to
the relational model and can be easily converted relational
model by converting the ER model to the table. This model
can also be converted to any other model like network
model, hierarchical model etc.
7.
2. Representational DataModel
• This type of data model is used to represent only the logical part of
the database and does not represent the physical structure of the
database.
• The representational data model allows us to focus primarily, on the
design part of the database.
• A popular representational model is a Relational model.
• In the Relational Model, we basically use tables to represent our
data and the relationships between them.
• It is a theoretical concept whose practical implementation is done in
Physical Data Model.
Physical Data Model
•The physical Data Model is used to practically implement
Relational Data Model. Ultimately, all data in a database is
stored physically on a secondary storage device such as discs
and tapes.
• Here, we basically save tables in memory so they can be
accessed efficiently.
• Structured Query Language (SQL) is used to practically
implement Relational Algebra.
• This Data Model describes HOW the system will be
implemented using a specific DBMS system.
• The purpose is actual implementation of the database.