Data Model
Database System
08 November 2024
Shams Ullah
Lecturer in Computer
Science
GPGC Miran Shah
Week III
Contents
Definition
Importance
Types
Conclusion
2
3
4
22
23
Definition
3
A data model in a database management system
(DBMS) is a way to organize, document, and define data
in a database. It shows how data is connected, stored,
accessed, and changed
The term “data model” refers to the way of
representing the logical structure of a database
Relational Model
Hierarchical
Model
Network Model Entity-
Relationship
Model
Object-Oriented
Data Model
Object-
Relational Data
Model
Types
4
Hierarchical Data Model
5
A hierarchical data model is a type of database model
that organizes data into a tree-like structure, where
data elements are linked through parent-child
relationships
One of the most influential hierarchical database
systems is IBM's IMS (Information Management
System), introduced in the late 1960s
Advantages
6
Disadvantage
s
• Simple Structure
• Fast Data Retrieval
• Efficient Querying
• Data Integrity
• Controlled Access and
Security
• Rigid Structure
• Insertion and Deletion
Constraints
• Complex Queries for Non-
Hierarchical Data
• Difficult Data Modification
• Complex Management and
Maintenance
Network Model
7
This looks like a Hierarchical database model due to
which many time it is called as modified version of
Hierarchical database. Network database model
organize data more like a graph and can have more
than one parent node.
This model was formalized by the Database Task group
in the 1960s. This model is the generalization of the
hierarchical model
Advantages
8
Disadvantages
• Simple and easy to design
• Can handle multiple types of
relationships
• Easy access
• Data Integrity
• Controlled Access and Security
• Complex in nature
• Existence of operational
anomalies
• Not user-friendly
• No query optimization
• Can’t achieve structural
independence even though it
achieves data independence.
Feature Hierarchical Model Network Model
Structure Tree-like structure Graph structure
Relationships One-to-many (single parent, multiple children) Many-to-many (multiple parents and children)
Flexibility Less flexible More flexible
Data Access Single access path Multiple access paths
Redundancy Higher redundancy due to rigid hierarchy Lower redundancy due to shared relationships
Complexity Simpler to design and implement More complex to design and manage
Usage Scenario Suitable for simple, hierarchical data structures Suitable for complex, interconnected data structures
Efficiency Efficient for hierarchical traversal Efficient for complex queries and data retrieval
Example Organizational chart Telecommunications network
9
ER Data Model
10
The Entity Relational Model is a model for
identifying entities to be represented in the database
and representation of how those entities are related
Peter Chen developed the ER diagram in 1976. The ER
model was created to provide a simple and
understandable model for representing the structure
and logic of databases. It has since evolved into
variations such as the Enhanced ER Model
Advantages
11
Disadvantages
• Simple
• Effective
• Easy to understand
• Integrated
• Useful in decision making
• Easy conversion
• Database troubleshooting
• Flexible
• Minimize data redundancy
• Scalability
• Visual representation
• Documentation
• Loss of information
• Limited relationship
• No preservation for data manipulation
• No industry standard
• Data inconsistency
• Missing cardinalities
• Difficult to modify
• Limited attribute representation
• Lack of support for business rules
• Difficult to scale
• Dependence on user understanding
• Limited support for abstraction
12
Relational Data Model
13
The relational model represents data in the form of
relation/table.
E.F. Codd proposed the relational Model to model
data in the form of relations or tables. After
designing the conceptual model of the Database
using ER diagram, we need to convert the
conceptual model into a relational model which can
be implemented using any RDBMS language like
Oracle SQL, MySQL, etc.
Advantages
14
Disadvantages
• Simple model
• Flexible
• Secure
• Data Accuracy
• Data Integrity
• Operations can be Applied Easily
• Relational Database Model is not
very good for large databases.
• Sometimes, it becomes difficult to
find the relation between tables.
• Because of the complex structure,
the response time for queries is
high.
15
Object Oriented Data
Model
16
In Object Oriented Data Model, data and their
relationships are contained in a single
structure which is referred as object in this data
model. In this, real world problems are
represented as objects with different
attributes. All objects have multiple
relationships between them.
To represent the complex real world problems
there was a need for a data model that is
closely related to real world. Object Oriented
Data Model represents the real world problems
easily.
Advantages
17
Disadvantages
• Codes can be reused due to
inheritance.
• Easily understandable.
• Cost of maintenance can reduced
due to reusability of attributes
and functions because of
inheritance.
• It is not properly developed so not
accepted by users easily.
18
Object Oriented Data
Model Terminologies
Object Relational Data
Model
19
As the name suggests, the Object-Relational Data Model
merges the relational and Object-Oriented models. This
model was designed to bridge the gap that existed between
the two paradigms. It offers numerous capabilities like
creating complex data types based on our needs using
existing data types. However, the complexity of this model
can make it challenging to handle, underlining the
importance of a thorough understanding of the model.
One of the primary objectives of the Object-Relational data
model is to smoothen the integration of Object-Oriented
practices with the Relational databases predominantly used
in programming languages such as C++, C#, and Java.
Advantages
20
Disadvantage
s
• The Power of Inheritance
• Handling Complex Data Types
• The Scope for Extensibility
• The complexity of this data model,
resulting from its integration of
the features of both the Object-
Oriented and the Relational data
models, can sometimes make it
quite challenging to manage
OODBMS ORDBMS
It stands for Object Oriented Database
Management System.
It stands for Object Relational Database
Management System.
Object-oriented databases, like Object Oriented
Programming, represent data in the form of
objects and classes.
An object-relational database is one that is based
on both the relational and object-oriented
database models.
OODBMSs support ODL/OQL.
ORDBMS adds object-oriented functionalities to
SQL.
Every object-oriented system has a different set of
constraints that it can accommodate.
Keys, entity integrity, and referential integrity are
constraints of an object-oriented database.
The efficiency of query processing is low. Processing of queries is quite effective.
21
Difference Between OODBMS and
ORDBMS
• Accurate data representation
• Relationship between database
objects
• Control of data redundancy
• Security
• Security
• Faster software builds
• Reduced cost
• Improved performance
• Better documentation
• High-quality applications
• Data analytics and visualization
Purpose/Importance
22
The End
Database Systems
2024 November 08
Shams Wazir
Week III

Data Models in Database Managment System

  • 1.
    Data Model Database System 08November 2024 Shams Ullah Lecturer in Computer Science GPGC Miran Shah Week III
  • 2.
  • 3.
    Definition 3 A data modelin a database management system (DBMS) is a way to organize, document, and define data in a database. It shows how data is connected, stored, accessed, and changed The term “data model” refers to the way of representing the logical structure of a database
  • 4.
    Relational Model Hierarchical Model Network ModelEntity- Relationship Model Object-Oriented Data Model Object- Relational Data Model Types 4
  • 5.
    Hierarchical Data Model 5 Ahierarchical data model is a type of database model that organizes data into a tree-like structure, where data elements are linked through parent-child relationships One of the most influential hierarchical database systems is IBM's IMS (Information Management System), introduced in the late 1960s
  • 6.
    Advantages 6 Disadvantage s • Simple Structure •Fast Data Retrieval • Efficient Querying • Data Integrity • Controlled Access and Security • Rigid Structure • Insertion and Deletion Constraints • Complex Queries for Non- Hierarchical Data • Difficult Data Modification • Complex Management and Maintenance
  • 7.
    Network Model 7 This lookslike a Hierarchical database model due to which many time it is called as modified version of Hierarchical database. Network database model organize data more like a graph and can have more than one parent node. This model was formalized by the Database Task group in the 1960s. This model is the generalization of the hierarchical model
  • 8.
    Advantages 8 Disadvantages • Simple andeasy to design • Can handle multiple types of relationships • Easy access • Data Integrity • Controlled Access and Security • Complex in nature • Existence of operational anomalies • Not user-friendly • No query optimization • Can’t achieve structural independence even though it achieves data independence.
  • 9.
    Feature Hierarchical ModelNetwork Model Structure Tree-like structure Graph structure Relationships One-to-many (single parent, multiple children) Many-to-many (multiple parents and children) Flexibility Less flexible More flexible Data Access Single access path Multiple access paths Redundancy Higher redundancy due to rigid hierarchy Lower redundancy due to shared relationships Complexity Simpler to design and implement More complex to design and manage Usage Scenario Suitable for simple, hierarchical data structures Suitable for complex, interconnected data structures Efficiency Efficient for hierarchical traversal Efficient for complex queries and data retrieval Example Organizational chart Telecommunications network 9
  • 10.
    ER Data Model 10 TheEntity Relational Model is a model for identifying entities to be represented in the database and representation of how those entities are related Peter Chen developed the ER diagram in 1976. The ER model was created to provide a simple and understandable model for representing the structure and logic of databases. It has since evolved into variations such as the Enhanced ER Model
  • 11.
    Advantages 11 Disadvantages • Simple • Effective •Easy to understand • Integrated • Useful in decision making • Easy conversion • Database troubleshooting • Flexible • Minimize data redundancy • Scalability • Visual representation • Documentation • Loss of information • Limited relationship • No preservation for data manipulation • No industry standard • Data inconsistency • Missing cardinalities • Difficult to modify • Limited attribute representation • Lack of support for business rules • Difficult to scale • Dependence on user understanding • Limited support for abstraction
  • 12.
  • 13.
    Relational Data Model 13 Therelational model represents data in the form of relation/table. E.F. Codd proposed the relational Model to model data in the form of relations or tables. After designing the conceptual model of the Database using ER diagram, we need to convert the conceptual model into a relational model which can be implemented using any RDBMS language like Oracle SQL, MySQL, etc.
  • 14.
    Advantages 14 Disadvantages • Simple model •Flexible • Secure • Data Accuracy • Data Integrity • Operations can be Applied Easily • Relational Database Model is not very good for large databases. • Sometimes, it becomes difficult to find the relation between tables. • Because of the complex structure, the response time for queries is high.
  • 15.
  • 16.
    Object Oriented Data Model 16 InObject Oriented Data Model, data and their relationships are contained in a single structure which is referred as object in this data model. In this, real world problems are represented as objects with different attributes. All objects have multiple relationships between them. To represent the complex real world problems there was a need for a data model that is closely related to real world. Object Oriented Data Model represents the real world problems easily.
  • 17.
    Advantages 17 Disadvantages • Codes canbe reused due to inheritance. • Easily understandable. • Cost of maintenance can reduced due to reusability of attributes and functions because of inheritance. • It is not properly developed so not accepted by users easily.
  • 18.
  • 19.
    Object Relational Data Model 19 Asthe name suggests, the Object-Relational Data Model merges the relational and Object-Oriented models. This model was designed to bridge the gap that existed between the two paradigms. It offers numerous capabilities like creating complex data types based on our needs using existing data types. However, the complexity of this model can make it challenging to handle, underlining the importance of a thorough understanding of the model. One of the primary objectives of the Object-Relational data model is to smoothen the integration of Object-Oriented practices with the Relational databases predominantly used in programming languages such as C++, C#, and Java.
  • 20.
    Advantages 20 Disadvantage s • The Powerof Inheritance • Handling Complex Data Types • The Scope for Extensibility • The complexity of this data model, resulting from its integration of the features of both the Object- Oriented and the Relational data models, can sometimes make it quite challenging to manage
  • 21.
    OODBMS ORDBMS It standsfor Object Oriented Database Management System. It stands for Object Relational Database Management System. Object-oriented databases, like Object Oriented Programming, represent data in the form of objects and classes. An object-relational database is one that is based on both the relational and object-oriented database models. OODBMSs support ODL/OQL. ORDBMS adds object-oriented functionalities to SQL. Every object-oriented system has a different set of constraints that it can accommodate. Keys, entity integrity, and referential integrity are constraints of an object-oriented database. The efficiency of query processing is low. Processing of queries is quite effective. 21 Difference Between OODBMS and ORDBMS
  • 22.
    • Accurate datarepresentation • Relationship between database objects • Control of data redundancy • Security • Security • Faster software builds • Reduced cost • Improved performance • Better documentation • High-quality applications • Data analytics and visualization Purpose/Importance 22
  • 23.
    The End Database Systems 2024November 08 Shams Wazir Week III