DBMS M1 - Part 2 (FYIT)
DBMS M1 - Part 2 (FYIT)
SYSTEM (DBMS)
A data Model in Database Management System (DBMS) is the concept of tools that are
developed to summarize the description of the database. Data Models provide us with a
transparent picture of data which helps us in creating an actual database. It shows us from
the design of the data to its proper implementation of data.
The data models collectively grouped into the major groups like ‘Object based conceptual
Models’ and ‘Record based conceptual models.
Importance of Data models
Data models are crucial in the design and management of databases for several reasons:
1. Foundation for Database Design
- Blueprint: Data models provide a blueprint for how data is organized, stored, and retrieved in a
database. They define the structure, relationships, and constraints, ensuring that the database
design aligns with the real-world requirements of the application.
-Consistency: By adhering to a well-defined data model, databases maintain consistency in how
data is structured, leading to more reliable and predictable outcomes.
2. Facilitates Communication
- Common Language: Data models serve as a common language between different stakeholders,
such as developers, database administrators, and business analysts. They help in clearly
communicating the data requirements and how they should be implemented.
- Requirement Gathering: During the initial phases of database design, data models help in
gathering and documenting requirements, making sure that all aspects of the business logic are
captured accurately.
5. Supports Scalability
- Growth Management: As the database grows, a solid data model helps in managing and scaling the database
efficiently, ensuring that it can handle increased load and data volume without significant performance degradation.
- Modularity: Data models can be designed in a modular fashion, allowing parts of the database to be scaled
independently as needed.
7. Data Types: Data types define the kind of data that can be stored in an attribute.
Examples: `Integer` for whole numbers, `Varchar` for variable-length text, `Date` for date
values, `Boolean` for true/false values.
Purpose: Data types ensure that attributes store data in the correct format and prevent
invalid data from being entered.
8. Indexes: An index is a data structure that improves the speed of data retrieval
operations on a database table.
Examples: Indexes on columns like `StudentID` or `LastName` to speed up search
operations.
Purpose: Indexes optimize query performance, allowing faster access to data without
scanning the entire table.
OBJECT BASED CONCEPTUAL MODELS
Object based conceptual models are used to describe the data model at the logical
view level and external view levels.
• These types of models are flexible enough to explain the structuring capabilities.
• The data conditions of consistency are explicitly specified in addition to the
structuring of data.
• The object based conceptual models include: ER (Entity Relationship) Model and
Object-Oriented Model.
Types of Object-Based Conceptual Models: 1.ER MODEL
This type of data models is also used to describe the data at conceptual (logical)
and view levels. The implementation details are provided at physical levels.
• Different types of records in respective format are structured to form a
database.
• As the database is a collection of such record formats this data model is called
as record-based conceptual model.
• The models which come under record based conceptual models list are
Hierarchical, Network and Relational model. Among these three models the
Relational Model is most widely accepted data model.
1. Hierarchical Data Model
• The hierarchical data model was the first DBMS-based model. This model organizes
data in a hierarchical tree structure. The hierarchy begins at the root, which contains
root data. It then expands into a tree, adding child nodes to the parent node. This
model can easily represent real-world relationships, such as sitemaps, food recipes,
or website navigation.
• Characteristics of Hierarchical Model:
• One-to-many relationships: Here, the data is organized in a tree-like manner with a
one-to-many relationship between data types. There can only be one path from any
parent to any node.
• Parent-Child Relationship Every child node has its parent node, but a parent can
have more than one child. Multiple parents are prohibited.
• Deletion Issue: When a parent node has been deleted, the child node will also be
deleted.
• Pointers: Pointers link the parent and child nodes. They are used for navigation
between stored data.
• Example: The visual representation of the basic concepts of the database
schema is shown below, where the college node points to two other nodes,
the department and the infrastructure. This example is explained by taking
real-world entities.
• The Advantages of the Hierarchical Model
• It's very easy and quick to navigate through a tree-like structure.
• Changes in the parent node are automatically reflected in child nodes,
so data integrity is maintained.
• Easy to find the difference.
• The Disadvantages of the Hierarchical Model
• Complex relationships cannot be supported.
• It does not support more than one parent of the child node. If there is a
complex relationship where a child node requires two parent nodes, it
cannot be represented with this model.
• The child node will be deleted automatically if a parent node has been
deleted.
2. Network Model
• This model is an extension of the hierarchical one - allowing
for many-to-many relationships. Thus a record can have more
than one parent in this model. This model was the most well-
known before the relational one. This model replaces the
hierarchical trees with a graph.
• Example: In this example, we can see that all three child
nodes (employee, customer and product) are connected to
Vendor and Sales Transaction. In the hierarchical structure,
this was not possible.