Lecture 1.2.1 - Data Models and Lecture 1.2.2 - Relational Model
Lecture 1.2.1 - Data Models and Lecture 1.2.2 - Relational Model
2
COURSE OUTCOMES
3
Unit-1 Syllabus
Unit-1 Introduction to Databases and Relational Algebra
Overview of Database concepts, DBMS, Data Base System Architecture (Three
Databases: Level ANSI-SPARC Architecture), Advantages and Disadvantages of
DBMS, Data Independence, DBA and Responsibilities of DBA,
Relational Data Structure, Keys, Relations, Attributes, Schema and
Instances, Referential integrity, Entity integrity.
5
What is Data Model
• A data model is an abstract model that organizes elements of data
• It standardizes how they relate to one another and to the properties
of real-world entities.
• Data models define how the logical structure of a database is
modeled.
• Data Models are fundamental entities to introduce abstraction in a
DBMS.
• Data models define how data is connected to each other and how
they are processed and stored inside the system.
6
Need
To aid in the development of a sound database design that does not
allow anomalies or inconsistencies
Goal: to create database tables that do not contain duplicate data values
that can become inconsistent
7
Hierarchical Model
slideplayer.com
8
Equivalent model
Slideplayer.com
9
Cont...
• Advantages
• Many of the hierarchical data model’s features formed the foundation for current data
models
• Its database application advantages are replicated, implemented in a different form, in
current database environments
• Generated a large installed (mainframe) base, created a pool of programmers who
developed numerous tried-and-true business applications
• Disadvantages
• Complex to implement
• Difficult to manage
• Lacks structural independence
• Implementation limitations
• Lack of standards
10
Network Model
slideplayer.com
11
Equivalent
slideplayer.com
12
Cont...
• Advantages
• Represent complex data relationships more effectively
• Improve database performance
• Impose a database standard
• Disadvantages
• Too cumbersome
• The lack of ad hoc query capability put heavy pressure on programmers
• Any structural change in the database could produce havoc in all application
programs that drew data from the database
• Many database old-timers can recall the interminable information delays
13
Relational Model
Slideplayer.com
14
Equivalent model
15
Relational Database
A database whose logical organization is based on relational data model
is a Relational Database
Quantumcomputingtech.blogspot.com
16
Relational Model
The main highlights of this model are −
• Data is stored in tables called relations.
• Relations can be normalized.
• In normalized relations, values saved are atomic values.
• Each row in a relation contains a unique value.
• Each column in a relation contains values from a same domain.
17
Entity- Relationship Model
• Entity-Relationship (ER) Model is based on the notion of real-world
entities and relationships among them. While formulating real-world
scenario into the database model, the ER Model creates entity set,
relationship set, general attributes and constraints.
• ER Model is best used for the conceptual design of a database.
tutorialspoint.com
18
Schema vs Instances
• Database Schema: The description of a database. Includes
descriptions of the database structure and the constraints that should
hold on the database.
• Schema Diagram: A diagrammatic display of (some aspects of) a
database schema.
• Database Instance: The actual data stored in a database at a
particular moment in time. Also called database state (or
occurrence).
19
DBMS Schema vs DBMS State
• Database State: Refers to the content of a database at a moment in time.
• Initial Database State: Refers to the database when it is loaded
• Valid State: A state that satisfies the structure and constraints of the database.
• Distinction
• The database schema changes very infrequently. The database state changes
every time the database is updated.
• Schema is also called intension, whereas state is called extension.
20
Summary
• A Data Model is a precise description of the data content in a system.
• Data Models are required to aid in the development of a sound
database design that does not allow anomalies or inconsistencies
where the basic goal is to create database tables that do not contain
duplicate data values that can become inconsistent.
21
FAQs
• What are Data Models?
• What is Schema
• What are instances.
• What is the difference between DBMS Schema and DBMS State.
• Why there is need for Data models?
• How many types of Data Models we Have?
• What is hierarichal Data Model?
References
23
THANK YOU
For queries
Email: [email protected]
24