0% found this document useful (0 votes)
7 views13 pages

Schema Instances Data Independence Models

The document provides an overview of database management systems, focusing on the concepts of database schema and instances, data independence, and various database models. It explains how schemas define the structure of a database while instances represent the actual data, and discusses the importance of data independence in maintaining flexibility and minimizing disruption. Additionally, it compares different database models such as hierarchical, network, relational, object-oriented, and entity-relationship models, highlighting their structures, use cases, advantages, and disadvantages.

Uploaded by

Sargam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views13 pages

Schema Instances Data Independence Models

The document provides an overview of database management systems, focusing on the concepts of database schema and instances, data independence, and various database models. It explains how schemas define the structure of a database while instances represent the actual data, and discusses the importance of data independence in maintaining flexibility and minimizing disruption. Additionally, it compares different database models such as hierarchical, network, relational, object-oriented, and entity-relationship models, highlighting their structures, use cases, advantages, and disadvantages.

Uploaded by

Sargam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Madhav

Institute
of
Technology

Database Management System &


Science
Gwalior (M.P.)
(Deemed
University)

By

Prof. Ramnaresh Sharma


Assistant Professor
Centre for Artificial Intelligence
Database Schema and Instances:
• In database management, a schema defines the structure
of a database, including how data is organized and how Madhav
Institute
relationships between data are managed. It acts as a of
Technology
blueprint for the database, specifying tables, fields, data &
types, constraints, relationships, and more. Science
Gwalior (M.P.)
• An instance, in contrast, refers to the actual data stored in (Deemed
University)
the database at a particular moment in time. It's a snapshot
of the data that fits within the schema.
• Schema: The logical design or blueprint of the database
(structure, tables, relationships).
• Instance: The actual content of the database at any point in
time (specific records, data).
ls like.
Database Schema and Instances(Cont.):
Example
• If you imagine the database as a building:
Madhav
• The schema is like the architectural plan of the building, defining where Institute
of
rooms (tables), doors (relationships), and walls (constraints) are. Technology
&
• The instance is like the actual people, furniture, and items in the rooms at Science
Gwalior (M.P.)
a given moment. (Deemed
University)
• In relational databases:
• The schema involves tables, columns, data types, constraints (like primary
keys), and relationships (like foreign keys).
• An instance is the current set of rows in those tables following that
schema.
• Schemas can be static (changing infrequently), while instances change
dynamically as data is added, modified, or deleted.
Data independence :
In a Database Management System (DBMS) refers to the capability to change the schema at one
level of the database system without requiring changes at the next higher level. It’s a keyMadhav
feature
in modern database systems that ensures minimal disruption when changes are made to Institute
theof
database’s structure or storage. Technology
&
• Types of Data Independence Science
Gwalior (M.P.)
• Logical Data Independence: (Deemed
University)

– Definition: The ability to change the logical schema (e.g., adding or modifying tables,
columns, or relationships) without affecting the external schema or application programs.
– Example: If a new attribute is added to a table, it doesn’t require modifications to the
existing applications that access that table.
– Significance: It is more challenging to achieve because changes at the logical level could
impact various applications.
Data independence :
Physical Data Independence:
– Definition: The ability to change the physical schema
(e.g., how data is stored, indexing, or file organization)
without affecting the logical schema or application
programs.
– Example: If the database admin changes the storage
structure for better performance (like using different
indexing or storage techniques), it doesn’t require changes
to the logical schema or to the applications interacting with
the database.
– Significance: This is easier to achieve and is crucial for
optimizing performance without disturbing the logical
design.
Importance of Data Independence:

• Maintenance: Simplifies maintenance and management of the database.


Madhav
• Scalability: Allows for easier upgrades and modifications to the database Institute
of
system as requirements. Technology
&
• Minimized Impact: Reduces the need to rewrite application code when Science
changes are made to either the logical or physical schema. Gwalior (M.P.)
(Deemed
• Relationship to the Three-Schema Architecture University)

• Data independence is a core concept in the three-schema architecture of


DBMS, which includes:
• External Schema: User views and application-specific data.
• Logical Schema: The overall logical structure, defining how the data is
organized and related.
• Physical Schema: How the data is actually stored on the storage medium.
• Logical data independence protects the external schema from changes in
the logical schema, while physical data independence protects the logical
schema from changes in the physical storage.
Different Type Database Models:
Data models in a Database Management System (DBMS) define how data is Madhav Institute
of
structured, stored, and accessed. Different data models serve different Technology
&
requirements and use cases. Here’s a comparison of the most common data Science
models in a DBMS: Gwalior (M.P.)
(Deemed
1. Hierarchical Data Model University)

Structure: Organizes data in a tree-like structure with parent-child


relationships.
Data Representation: Each parent can have multiple children, but each
child can have only one parent.
Use Case: Early applications like Information Management Systems (IMS).
Advantages: Simple and fast for applications with a clear hierarchical
structure.
Disadvantages: Limited flexibility; difficult to reorganize the hierarchy
Different Type Database Models: (Cont.):
Network Data Model
• Structure: A more complex graph structure where entities can have
multiple parent-child relationships.
• Data Representation: Data is organized as records, and
relationships are represented as sets.
• Use Case: Suitable for complex relationships and many-to-many
data associations.
• Advantages: More flexible than hierarchical models, allowing for
complex relationships.
• Disadvantages: Complex schema design and harder to manage.
Different Type Database Models Cont.):
Relational Data Model Madhav
Institute
• Structure: Organizes data into tables (relations) with rows (tuples) and columns of
(attributes). Technology
&
• Data Representation: Each table represents an entity, and relationships are Science
Gwalior (M.P.)
established using foreign keys. (Deemed
University)
• Use Case: Widely used in business applications, financial systems, and e-
commerce.
• Advantages: High flexibility, easy to use, supports powerful query languages
(e.g., SQL).
• Disadvantages: Performance issues with very large datasets, especially with
complex joins.
Different Type Database Models Cont.):
Object-Oriented Data Model
Madhav
• Structure: Combines object-oriented programming principles with Institute
of
database systems. Technology
&
• Data Representation: Data is represented as objects, similar to Science
Gwalior (M.P.)
object-oriented programming languages. (Deemed
University)
• Use Case: Suitable for applications where data is complex and can
be naturally represented as objects.
• Advantages: Supports complex data types and encapsulation; good
for multimedia and CAD applications.
• Disadvantages: Less mature than relational models, and complex
for traditional relational database users.
• .
Different Type Database Models Cont.):
Entity-Relationship (ER) Model
• Structure: Visual representation using entities (objects) and Madhav
Institute
relationships. of
Technology
• Data Representation: Entities are objects with attributes, and &
Science
relationships define interactions between entities. Gwalior (M.P.)
(Deemed
• Use Case: Primarily used in database design as a conceptual University)

framework before implementing other data models.


• Advantages: Intuitive visual representation makes it easy to
understand the data structure.
• Disadvantages: Needs conversion to a physical model (e.g.,
relational model) for implementation.
Different Type Database Models.:
• Summary Table
Data Model Structure Key Use Cases Advantages Disadvantages Madhav
Institute
Simple, fast access for Rigid, hard to of
Hierarchical Tree-like Early legacy systems
hierarchical data reorganize Technology
&
Science
Gwalior (M.P.)
Flexible, supports
Complex schema(Deemed
and
Network Graph-like Complex relationships many-to-many University)
management
relationships

Flexible, powerful Performance issues


Relational Tables Business, e-commerce
query capabilities with large datasets

Complex, multimedia Natural representation Complex, less mature


Object-Oriented Objects
applications of real-world entities than relational models

ER (Entity- Intuitive, easy to Needs conversion to


Conceptual diagram Database design
Relationship) understand other models
Madhav
Institute
of
Technology
&

Thank You
Science
Gwalior (M.P.)
(Deemed
University)

You might also like