DBMS Unit 1
DBMS Unit 1
Shweta
Definition:-
A Database Management System (DBMS) is software that interacts with end users,
applications, and the database to capture and analyse data. It allows for creating, querying,
updating, and administrating databases.
Imagine you have a large collection of books at home. To find a specific book, you might
need to go through each one until you find the right one. Now, think about a library where
books are organized systematically. You can search by title, author, or genre, making the
process much quicker and more efficient. A DBMS is like the librarian—it helps you
organize, manage, and retrieve data efficiently.
Real-Life Example:
Consider a school with hundreds of students. The school needs to keep track of each
student's details, such as name, age, grades, and attendance. If all this data were stored in
individual files, it would be cumbersome to manage. With a DBMS, the school can store all
the data in a structured format, making it easy to update, retrieve, and analyze.
1
Dr. Shweta
File System
A File System is a method and data structure used by an operating system to manage files on
a storage device, such as a hard drive or SSD. It determines how data is stored, retrieved, and
organized.
● FAT (File Allocation Table): One of the oldest file systems, FAT was developed by
Microsoft for early versions of Windows. Variants include FAT12, FAT16, FAT32, and
exFAT. Used in portable storage devices like USB drives, memory cards, and older
operating systems. Real-Life eg :Think of FAT as a simple filing cabinet. Each drawer
(cluster) can hold a limited amount of paper (data), and there’s a master list (file
allocation table) that keeps track of where each document (file) is stored.
● NTFS (New Technology File System): NTFS is a proprietary file system developed
by Microsoft, introduced with Windows NT. It’s the default file system for modern
Windows operating systems. Used in Windows operating systems, internal hard
drives, and SSDs in Windows PCs. Real-Life eg: NTFS is like a high-tech office
filing system. It not only stores documents but also tracks who can access them,
compresses files to save space, and keeps logs to ensure nothing gets lost or damaged.
● ext (Extended File System): The ext family includes ext2, ext3, and ext4, with ext4
being the most widely used in Linux operating systems. The default file system for
most Linux distributions is used in servers and desktops running Linux. Real-Life eg:
ext is like a well-organized library catalogue system. It ensures that books (files) are
well-indexed, can handle a large collection, and maintains a log (journal) to prevent
loss during unexpected events.
● NFS (Network File System): NFS is a distributed file system protocol developed by
Sun Microsystems that allows users to access files over a network as if they were on
their local storage. Commonly used in enterprise environments to allow users to
access shared files from a centralized server. Real-Life eg: NFS is like having a
shared office network drive that everyone in the office can access, regardless of their
computer’s operating system.
2
Dr. Shweta
A file system is responsible for organizing data on a storage medium. Here's a simplified
view of how it works:
1. File Creation: When a file is created, the file system allocates space on the storage
device and records the location of the data blocks. It also stores metadata like the file
name, size, and creation date.
2. File Access: When you open a file, the file system locates the data blocks based on
the metadata and loads the file into memory.
3. File Modification: When you modify a file, the changes are written back to the
storage medium. The file system updates the metadata and ensures data integrity.
4. File Deletion: When you delete a file, the file system marks the space as available for
new data but doesn’t immediately erase the data. This is why deleted files can
sometimes be recovered.
5.
3
Dr. Shweta
Data Storage Stores data as individual files Stores data in tables, with relationships
within directories, with no between data entities, allowing for
inherent structure beyond the structured data management.
file hierarchy.
Data Access Accessed through the file Accessed via queries using SQL
name and directory path, (Structured Query Language) or other
often manually or with simple query languages, allowing complex
programs. operations on data.
Data Integrity Limited mechanisms for Provides strong data integrity with
ensuring data consistency and ACID (Atomicity, Consistency,
integrity, often relying on the Isolation, Durability) properties,
user or application to manage ensuring reliable transaction
this. processing.
4
Dr. Shweta
Backup and Basic backup features, often Advanced backup and recovery
Recovery requiring manual features, often automated, with
intervention; recovery can be mechanisms to restore data to a
difficult and prone to data consistent state after a failure.
loss.
5
Dr. Shweta
Performance Can be faster for simple, Optimized for handling large datasets
sequential file access tasks. and complex queries but may have
overhead due to transaction
management.
Cost and Generally simpler and less Typically more complex and
Complexity expensive to implement and expensive, requiring specialized
maintain. software and expertise.
Database Systems
A Database System is a complex software system designed to manage, store, and retrieve
large amounts of structured data efficiently. It allows users and applications to interact with
the data through various operations such as querying, updating, and reporting. Database
systems are crucial in various domains, including business, finance, healthcare, and more.
Google's Database Size: Google processes over 3.5 billion searches per day, storing and
analyzing vast amounts of data in their custom database systems. Imagine the size and
complexity of their database architecture!
1. Relational (RDBMS)
2. Hierarchical
3. Network
4. NoSQL
5. Object-Oriented
1. Hierarchical Database
Definition:
A hierarchical database organizes data in a tree-like structure, where each record has a single
6
Dr. Shweta
parent and can have multiple children. This model represents data in a hierarchy similar to an
organizational chart, allowing for one-to-many relationships.
characteristics:
Examples:
● IBM Information Management System (IMS): One of the earliest and most widely
used hierarchical databases, especially in mainframe environments.
● Windows Registry: A hierarchical database used in Microsoft Windows to store
configuration settings.
Real-Life Example:
Imagine a company's organizational chart. The company (root) has departments (children),
departments have teams (grandchildren), and teams have employees (leaves). Navigating
this structure is straightforward due to its hierarchical nature.
Interesting Fact:
Hierarchical databases were among the first types of databases to be developed and are still in
use today, particularly in legacy systems that require simple, predictable data relationships.
2. Network Database
Definition:
A network database organizes data using a graph structure, allowing more complex
7
Dr. Shweta
Characteristics:
Examples:
Real-Life Example:
Consider a university database where students can enrol in multiple courses, and each
course can have multiple students. The network model efficiently represents the
many-to-many relationship between students and courses.
Interesting Fact:
The network model was standardized as the CODASYL database model in the late 1960s,
which was influential in the development of later database systems.
Definition:
An RDBMS organizes data into tables (relations) consisting of rows and columns. It is based
on the relational model introduced by E.F. Codd in 1970.
8
Dr. Shweta
Characteristics:
● Tabular Structure: Data is stored in tables with rows (records) and columns (fields).
● Structured Query Language (SQL): Uses SQL for defining and manipulating data.
● Data Integrity: Enforces data integrity through constraints like primary keys, foreign
keys, and unique constraints.
● ACID Compliance: Ensures transactions are Atomic, Consistent, Isolated, and
Durable.
● Flexibility in Queries: Supports complex queries, joins, and transactions.
Examples:
Real-Life Example:
An online banking system uses an RDBMS to manage customer accounts, transactions,
loans, and other financial data. Tables like Customers, Accounts, Transactions, and Loans
are interrelated, allowing the bank to efficiently process and query data.
Interesting Fact:
Relational databases are the most widely used type of database systems in the world, forming
the backbone of many enterprise and web applications.
4. NoSQL Database
Definition:
NoSQL databases are non-relational databases designed to handle unstructured or
9
Dr. Shweta
semi-structured data. They offer flexible data models and are optimized for scalability and
performance, especially in distributed and large-scale environments.
NoSQL for Speed: NoSQL databases like MongoDB are used by companies like
Facebook and Twitter because they handle huge amounts of data faster than traditional
relational databases. This is crucial when dealing with millions of users posting updates
every second!
Characteristics:
● Flexible Schema: No fixed schema, allowing for the storage of various data types.
● Various Data Models: Supports document, key-value, column-family, and graph data
models.
● Scalability: Designed to scale horizontally across multiple servers.
● Performance: Optimized for fast read and write operations in large-scale
applications.
● Eventual Consistency: Some NoSQL databases prioritize availability and partition
tolerance over immediate consistency.
Example: MongoDB
Real-Life Example:
A content management system (CMS) like WordPress or a blogging platform may use a
NoSQL database like MongoDB to store posts, comments, and user profiles. The flexible
schema allows for rapid development and handling of varied types of data without a
predefined structure.
Interesting Fact:
The term "NoSQL" was coined in 1998 for a lightweight, open-source relational database,
but it has evolved to represent a broad category of non-relational databases designed for
modern applications requiring scalability and flexibility.
10
Dr. Shweta
11
Dr. Shweta
● Hierarchical databases are ideal for applications with a clear, tree-like structure,
such as organizational charts or file systems.
● Network databases excel in scenarios requiring complex many-to-many
relationships, like telecommunications or transportation networks.
● Relational databases are versatile and widely used for structured data and
applications requiring robust transaction support, such as banking systems and
e-commerce platforms.
● NoSQL databases offer flexibility and scalability for modern applications dealing
with large volumes of unstructured or semi-structured data, such as social media
platforms and real-time analytics.
The First DBMS: The first-ever DBMS, called "Integrated Data Store" (IDS), was
created by Charles Bachman in the 1960s. This system is considered the
grandfather of modern DBMS and earned Bachman the prestigious Turing Award
in 1973.
Database Users
12
Dr. Shweta
In a Database Management System (DBMS), different types of users interact with the
database, each with specific roles, responsibilities, and levels of access. Understanding these
roles is crucial for effective database management, security, and ensuring that the database
meets the needs of all stakeholders. Here’s an overview of the main types of DBMS users:
● Role: DBAs are the custodians of the database. They are responsible for the overall
management, maintenance, and security of the database.
● Responsibilities:
○ Database Design: DBAs design the database schema, defining tables,
relationships, indexes, and other structures to ensure data is stored efficiently.
○ Performance Tuning: They monitor and optimize database performance,
ensuring queries run efficiently and the system remains responsive.
○ Backup and Recovery: DBAs regularly back up the database to prevent data
loss and implement recovery procedures in case of system failure.
○ Security Management: They control access to the database by setting user
permissions, ensuring that only authorized users can access or modify data.
○ Software Maintenance: DBAs install updates, patches, and new versions of
the DBMS software as needed.
● Access Level: High-level access, including administrative control over the entire
database.
● Example: The Library Manager oversees the entire library system. They
ensure the library's database is running smoothly, that only authorized staff
and students can access certain parts of the system, and that all data is
backed up regularly. If a new section is added to the library, like a digital
archives room, the Library Manager updates the system to include these
new resources.
In DBMS: The DBA manages the entire library database, ensuring it’s secure,
13
Dr. Shweta
2. Database Designers
● Role: Database designers, sometimes referred to as data architects, are responsible for
designing the database structure based on the needs of the organization.
● Responsibilities:
○ Schema Design: They define the database schema, determining how data will
be stored, organized, and related.
○ Normalization: They apply normalization techniques to reduce data
redundancy and ensure data integrity.
○ Modeling Relationships: Database designers create entity-relationship (ER)
diagrams and other models to visualize how different data entities relate to
each other.
○ Documentation: They document the database design, providing a blueprint
for implementation and future maintenance.
● Access Level: Design-level access, allowing them to define and modify the database
structure.
● Example: The Library Architect is responsible for designing how the library
database is structured. They decide how to organize information about books,
journals, and digital resources, and how different sections of the library relate to
one another. For example, they design the database so that each book is linked to its
author, subject, and availability status.
In DBMS: The Database Designer structures the database by defining tables, relationships,
and data flows within the library system.
14
Dr. Shweta
3. Application Developers
● Role: Application developers create software applications that interact with the
database. They write the code that enables users to access, modify, and manage data
through user interfaces.
● Responsibilities:
○ Writing Queries: Developers write SQL queries to retrieve, insert, update,
and delete data in the database.
○ User Interface Development: They develop front-end applications that
provide users with an easy way to interact with the database.
○ Integrating Databases: Developers integrate the database with other software
systems, ensuring smooth data flow between different applications.
○ Testing and Debugging: They test applications to ensure they function
correctly with the database and fix any bugs that arise.
● Access Level: Varies; typically, they have access to the database through APIs or
query interfaces, depending on the application’s requirements.
● Example: The Library Software Developer creates the online catalog that students
use to search for books and reserve them. They write the code that makes it possible
for a student to log in, search for a book, and see if it’s available. If the book is
checked out, the system allows the student to place a hold on it.
In DBMS: The Application Developer builds the software interface that connects the
library’s database with the users, enabling them to search and reserve books.
4. End Users
15
Dr. Shweta
● Role: End users are the individuals who interact with the database through
applications or interfaces designed by developers. They access the data to perform
specific tasks or retrieve information.
● Example: Students use the library’s online catalog to search for books, check if
they are available, and reserve them if necessary. Librarians use the system to
check books in and out, manage inventory, and assist students with their queries.
In DBMS: The End Users interact with the library database through the user interface
created by the Application Developer. Students search and reserve books, while Librarians
manage day-to-day operations.
A. Casual Users
● Who They Are: Casual users interact with the database occasionally, often using it to
retrieve specific information or run predefined queries. They do not have deep
technical knowledge of the database.
● Example: A university administrator who occasionally checks the student database to
retrieve information on student enrollments or graduation statistics.
● Tasks:
○ Running Predefined Queries: They may use a simple search form to find
specific data.
○ Viewing Reports: Casual users often access reports generated by others rather
than creating their own.
● Level of Interaction: Low; they rely on user-friendly interfaces like dashboards or
simple search functions to access the database.
16
Dr. Shweta
● Who They Are: These users interact with the database regularly as part of their job
but typically do so using applications specifically designed for their tasks. They do
not write SQL queries or understand the underlying database structure.
● Example: A bank teller using a banking application to process transactions, check
account balances, or update customer information.
● Tasks:
○ Routine Data Entry: Inputting data into the system, such as entering a new
customer's details.
○ Processing Transactions: Completing standard transactions like deposits,
withdrawals, or transfers using a specialized interface.
○ Using Standard Queries: Executing predefined operations that are embedded
in the application they use.
● Level of Interaction: Moderate; their work depends on interacting with the database,
but they do so through applications designed to make their tasks simple and error-free.
C. Sophisticated Users
● Who They Are: Sophisticated users are technically skilled individuals who
understand the database and can perform complex operations. They often include
analysts, engineers, and business professionals who need to manipulate data in
various ways.
● Example: A data analyst writing complex SQL queries to analyze sales data and
generate custom reports to identify trends.
● Tasks:
○ Custom Querying: Writing and running SQL queries to retrieve specific data.
○ Data Analysis: Using advanced tools to analyze large datasets and extract
meaningful insights.
○ Database Management: Some sophisticated users might perform tasks
related to database tuning or optimization, depending on their role.
● Level of Interaction: High; they have a deep understanding of the database and can
perform complex operations, often directly interacting with the database using query
languages like SQL.
17
Dr. Shweta
D. Standalone Users
● Who They Are: Standalone users work with personal or desktop databases that don’t
necessarily connect to a larger system. They manage their own small-scale databases
for specific needs, often using software like Microsoft Access or similar tools.
● Example: A small business owner using a local database to manage inventory and
sales records in their store.
● Tasks:
○ Database Creation: Setting up and managing their own database without
needing to interact with a central DBMS.
○ Data Entry and Querying: Inputting data and running queries directly on
their local database.
○ Simple Report Generation: Creating basic reports to analyze their own data.
● Level of Interaction: Variable; while they may not have deep technical knowledge,
they often manage all aspects of their database independently.
E. Application Users
● Who They Are: Application users interact with the database through specific
applications that hide the complexity of database operations. These applications are
designed to make tasks easy for users without requiring them to understand the
underlying database.
● Example: Employees using an HR application to submit leave requests, update
personal information, or check their payroll details.
● Tasks:
○ Using Predefined Functions: Application users typically perform tasks
defined by the application, such as submitting forms or generating standard
reports.
○ Limited Interaction: They interact with the database only through the
application's interface, which simplifies tasks and prevents errors.
18
Dr. Shweta
5. System Analysts
● Role: System analysts bridge the gap between business requirements and the technical
implementation of the database. They ensure that the database meets the
organisation’s needs.
● Responsibilities:
○ Requirement Analysis: Gather and analyze business requirements to ensure
the database design aligns with organizational goals.
○ System Design: Work with DBAs and developers to design systems that
leverage the database effectively.
○ Documentation: Create detailed documentation of system requirements and
designs to guide development and maintenance.
○ User Training: Assist in training end users and other stakeholders in using the
database effectively.
● Access Level: Moderate, with the ability to view and analyze the database structure
and performance but not typically involved in direct database management.
● Example: The Library Consultant works with the Library Manager to understand
the needs of both students and librarians. They gather requirements, like the need
for a faster search function or better tracking of overdue books, and ensure these
needs are addressed in the database system. They also suggest improvements, like
19
Dr. Shweta
integrating the library database with the university’s academic records system to
allow seamless access for students.
In DBMS: The System Analyst ensures that the library database system meets the needs of
all users and functions effectively within the university’s broader IT ecosystem.
● Example: The Library Data Analyst examines usage patterns in the library system.
They analyze which books are most frequently borrowed, which subjects are in
high demand, and what times of the year the library is busiest. Based on this data,
they might recommend purchasing more copies of popular books or extending
library hours during exam periods.
20
Dr. Shweta
In DBMS: The Data Analyst uses the library’s database to extract and analyze data,
providing insights that help improve the library’s services.
Advantages of DBMS
21
Dr. Shweta
Example:
In a banking system, the DBMS ensures that account balances are consistently updated across
all related tables, preventing discrepancies during transactions.
2. Data Security
DBMS provides robust security features, allowing administrators to control access to the
database. It enables setting permissions and roles, ensuring that only authorized users can
access or modify specific data.
Example:
In a healthcare system, sensitive patient information is protected by limiting access to
authorized personnel, ensuring compliance with regulations like HIPAA.
3. Data Independence
DBMS provides data abstraction, meaning the data’s physical storage is separated from its
logical structure. This allows changes to the physical data storage without affecting the
application programs that access the data.
Example:
A retail management system can change the storage location of product data without altering
the application logic used for inventory management.
A DBMS enables multiple users to access and share data simultaneously in a controlled
manner. This promotes collaboration and ensures that all users work with the most up-to-date
information.
Example:
In a university, faculty members, administrators, and students can simultaneously access
course schedules and grades, with the DBMS managing concurrent access.
DBMS systems provide automatic backup and recovery mechanisms, ensuring data is not lost
in case of system failure. They can recover data to a previous state using logs and backups.
22
Dr. Shweta
Example:
In case of a power outage, a company’s customer database can be restored to the last backup
point, minimizing data loss and downtime.
DBMS minimizes data redundancy (duplication) by centralizing data storage and eliminating
isolated data silos. This reduces the chances of inconsistencies and saves storage space.
Example:
Instead of storing customer details in multiple locations, a CRM system uses a single
database to store all customer information, ensuring that updates are reflected across the
system.
DBMS systems provide query languages (like SQL) that allow users to easily retrieve and
manipulate data. This simplifies the process of accessing specific information and generating
reports.
Example:
A sales manager can quickly generate a report showing sales performance by running an SQL
query, rather than manually sifting through large volumes of data.
World's Largest Database: The World Data Centre for Climate (WDCC) in Germany
holds one of the world's largest databases, storing over 220 petabytes of climate data.
That's equivalent to the data stored in over 47 million DVDs!
Disadvantages of DBMS
Implementing a DBMS can be expensive due to the cost of the software itself, as well as the
need for specialized hardware to handle the system’s demands.
23
Dr. Shweta
Example:
An organization may need to invest in high-performance servers and storage solutions to
efficiently run an enterprise-level DBMS like Oracle or Microsoft SQL Server.
2. Complexity
DBMS systems can be complex to design, implement, and maintain. They require skilled
personnel, such as database administrators (DBAs), to manage and optimize the system.
Example:
A small business may struggle with the complexity of setting up a DBMS, requiring them to
hire or train staff to manage the system effectively.
3. Performance
Example:
A large e-commerce platform might experience slower response times during peak shopping
periods due to the increased load on its DBMS.
DBMS systems often require significant storage space, especially when dealing with large
volumes of data. The storage needs can escalate as more data is added over time.
Example:
A media company storing high-resolution videos in a DBMS may quickly exhaust available
storage, requiring frequent upgrades or expansions.
24
Dr. Shweta
Example:
Regular maintenance tasks like indexing, query optimization, and backup scheduling must be
performed to ensure the smooth operation of a hospital’s patient management system.
Despite backup and recovery mechanisms, there is always a risk of data loss due to hardware
failures, software bugs, or human error. Recovery processes can sometimes be complex and
time-consuming.
Example:
If a backup process fails or is improperly configured, a retail company might lose critical
sales data, affecting their financial reporting.
7. Vendor Dependence
Organizations that use proprietary DBMS software can become dependent on the vendor for
updates, support, and new features. This can lead to challenges if the vendor discontinues the
product or increases costs.
Example:
A company using a specific version of Oracle DBMS might face difficulties if Oracle decides
to stop supporting that version, forcing the company to upgrade or switch to a different
system.
A DBMS offers numerous advantages, including improved data integrity, security, and
accessibility, making it a powerful tool for managing and utilizing data effectively.
However, these benefits come with potential drawbacks such as cost, complexity, and
maintenance requirements. Understanding these pros and cons is crucial for organizations
when deciding whether to implement a DBMS and selecting the right system to meet their
needs.
DBMS Architecture
25
Dr. Shweta
DBMS architecture is the blueprint that determines how a database system operates and
interacts with users. Whether it's the simplicity of 1-tier, the straightforward client-server
model of 2-tier, or the robust, scalable 3-tier architecture, each has its unique advantages
depending on the application's needs.
1-Tier Architecture:
In 1-tier architecture, the database is directly accessible by the user. This means the user
interacts directly with the DBMS, and both the data and the application reside on the same
machine.
Example: Imagine you're working on your personal computer, using a small database like
Microsoft Access or an Excel spreadsheet. Everything you need is right there on your
computer. This setup is simple but not suitable for large, complex systems with many users.
26
Dr. Shweta
Fact: 1-tier architecture is commonly used for single-user applications or when the database
size is relatively small.
2-Tier Architecture
How It Works:
● The Client is the user's interface, like an application or software where users input
their data.
● The Server is where the actual data is stored and managed.
Example: Imagine you’re using an online banking app. Your app (the client) connects to the
bank’s server, where all your account data is stored. The server handles all your requests, like
checking your balance or transferring money.
Interesting Fact: In the 2-tier architecture, the client directly interacts with the database
server. This is why it's fast for small-scale applications but can become slow if too many
users access the server simultaneously.
3-Tier Architecture
27
Dr. Shweta
3-tier architecture is the most common and versatile architecture used in modern DBMS
systems. It adds an extra layer between the client and the server, known as the Application
layer (or middle tier).
1. Client Tier (Presentation Layer): This is the user interface, like your web browser
or mobile app, where you interact with the system.
2. Application Tier (Logic Layer): This is the brain of the operation. It processes the
business logic, performs calculations, and decides how data should be handled.
3. Database Tier (Data Layer): This is where the actual data is stored and managed. It
includes the DBMS software and the physical database.
How It Works:
Example: Think of an online shopping website like Amazon. When you search for a product,
the client (your browser) sends a request to the application server. The application server
checks the database to find the products, processes the information, and sends it back to your
browser.
28
Dr. Shweta
Interesting Fact: The 3-tier architecture is very scalable, meaning it can handle many users
at once, which is why it’s used by large applications like e-commerce platforms, social media
sites, and banking systems.
Fun Fact:
Did you know that the 3-tier architecture is the foundation for most web applications?
From social media platforms like Facebook to online banking, this architecture makes it
possible for millions of users to interact with the same system seamlessly.
29
Dr. Shweta
DBMS architecture often organises data into three levels or views, which help in abstracting
the complexity of data management. These levels are:
The Physical View is the lowest level of abstraction and deals with where the data is actually
stored in the database. This view includes details like the file structures, indexes, and other
storage mechanisms used by the DBMS to manage data.
It is the most fundamental layer of DBMS architecture. This level deals with the actual
storage of data on physical hardware like hard drives or SSDs. The Physical Level is the
backbone of the DBMS. It’s where the raw data resides, organized in a way that supports
efficient retrieval and storage. Though invisible to the end user, the decisions made at this
30
Dr. Shweta
level have far-reaching consequences on the performance, scalability, and reliability of the
database system.
Example: Imagine a library where books are stored in a specific order on shelves. The
physical view would be concerned with how the books are physically arranged on those
shelves, the type of shelving used, and how the library catalogue is stored.
Consider a large-scale e-commerce website like Amazon. The physical level would involve
the actual storage of product details, user information, transaction records, and more. This
data might be spread across multiple servers and data centres worldwide. The DBMS at the
physical level ensures that this data is stored in an organised manner, with proper indexing to
allow for quick searches and retrieval, even as the database grows to include billions of
records.
Note: In most cases, users never interact with the physical view directly. It’s managed by the
DBMS, which ensures efficient data storage and retrieval.
Importance : The physical level is critical because it directly impacts the performance and
reliability of the database. Well-designed physical storage mechanisms can drastically
reduce the time it takes to retrieve data and can handle large amounts of data without
sacrificing performance.
The Logical Level, also known as the Conceptual Level, is the middle layer of DBMS
architecture. It represents the entire database as seen by the DBMS itself, abstracting away
the details of how the data is physically stored. The Logical View represents the structure of
the entire database as understood by the DBMS. It’s a middle level of abstraction that
describes what data is stored in the database and the relationships among those data. The
logical view is independent of how the data is physically stored, focusing instead on the
logical relationships.
At the logical level, the DBMS manages the database’s structure and ensures that data
remains consistent, accurate, and accessible. Key activities include Normalisation, Query
Processing, and Security.
31
Dr. Shweta
Example: Continuing with the library analogy, the logical view would be like the library’s
catalog system. It describes the books available, their authors, genres, and how they are
related to each other, but it doesn’t concern itself with how or where the books are actually
placed on the shelves.
Technical Example : Imagine a university’s database system. The logical level would define
entities like Students, Courses, and Teachers. It would also describe the relationships
between these entities (e.g., students enrol in courses, teachers teach courses) and enforce
rules like each course must have at least one teacher. The logical level doesn’t worry about
how this data is stored on disk; it only concerns itself with how the data is logically structured
and related.
Importance
The logical level is critical because it defines the data organisation within the database. It’s
where the structure of the database is determined, and it plays a vital role in ensuring that the
data remains consistent, accurate, and easy to retrieve.
The View Level is the highest/topmost level of abstraction and is concerned with the types of
individual users or user groups perceiving the data i.e who are going to see the data and
which part of the data. It provides a way to hide the complexity of the database from end
users and allows different users to have different views of the same database. The view level
is all about customization, ensuring that each user sees the data in a way that is most useful to
them.
Example: In our library example, the view level would be like a customised reading list or a
personalised section of the catalogue that only shows books relevant to a particular reader,
such as children’s books for kids or research papers for scholars.
Consider another example of a hospital management system. Different users (doctors, nurses,
administrators, patients) need different views of the database:
● Doctors might see a view that includes detailed patient records, lab results, and
treatment plans.
32
Dr. Shweta
● Nurses might see a more focused view with patient vitals, medication schedules, and
care instructions.
● Administrators might see a view with patient admission and discharge records,
billing information, and hospital resource allocation.
● Patients might only see their own medical records, appointment schedules, and
billing statements.
Each of these views is customised to meet the needs of the specific user, providing them with
the information they need while hiding unnecessary details.
Interesting Fact: The view level is particularly useful for security purposes. Different
users can be given access to different views of the data, ensuring that sensitive information
is only visible to those with the proper permissions.
33
Dr. Shweta
Real-Life Analogy
● Physical View: The physical view would be the backend servers and databases where
all the product information, user data, and transactions are stored. It includes details
like how the data is distributed across servers.
● Logical View: The logical view is how the platform's data is organised—like the
categories of products, relationships between orders and users, and inventory
management.
34
Dr. Shweta
● View Level: The view level is what you see when you log in. If you're a customer,
you see products to buy. If you’re a seller, you see inventory and sales data. An admin
might see everything but in a more summarized form.
1. Data Abstraction: The different views allow for data abstraction, meaning users
interact with data without worrying about its complexity.
2. Security: By providing different views, sensitive information can be restricted to
authorized users only.
3. Simplified Interaction: Users can interact with data in a way that’s most relevant to
them, making the system easier to use.
Conclusion
The various views of data in a DBMS ensure that the system is flexible, secure, and easy to
use. By separating the data into physical, logical, and view levels, the DBMS can efficiently
manage and present data according to the needs of different users, without overwhelming
them with unnecessary details. This layered approach helps keep the system organized and
accessible, making it easier to work with large and complex databases.
Data Independence
Data Independence is a key concept in Database Management Systems (DBMS) that allows
for the separation of data from the application programs that use the data. This separation
means that changes in the data structure or storage do not affect the application programs or
the way users interact with the data. Essentially, it ensures that the data can be modified or
updated without having to rewrite application programs.
Data independence is achieved through the use of abstraction layers in DBMS, which we
have already discussed: the Physical Level, Logical Level, and View Level. There are two
main types of data independence:
35
Dr. Shweta
Physical Data Independence refers to the ability to change the physical storage of data
without affecting the logical structure or the application programs.
Explanation:
● Physical Data Independence means that changes to the physical level of the database
(e.g., how data is stored on disk, how files are organized, indexing methods, storage
devices used) do not require changes at the logical level or in application programs.
● For example, if a database administrator decides to reorganize the way data is stored
to improve performance, such as by changing the indexing method or moving from
one storage device to another, these changes should not affect how the data is
logically structured or how the users and applications interact with it.
Example:
Consider a university database system. Suppose the data for student records is initially stored
on a single hard drive. Later, the university decides to migrate to a cloud storage system for
better scalability and access speed. With physical data independence, the change from hard
36
Dr. Shweta
drive storage to cloud storage should not require any modifications to the database schema
(logical level) or the application programs used by students and staff.
Importance:
Logical Data Independence refers to the ability to change the logical structure of the
database without affecting the external views or application programs.
Explanation:
● Logical Data Independence means that changes to the logical level of the database
(e.g., changing the schema, adding or deleting fields, modifying relationships) do not
require changes at the view level or in application programs.
● For example, if a database administrator needs to add a new field to a table or change
the relationship between tables, these changes should not affect how the users see the
data or how the applications interact with the data.
Example:
In the same university database, suppose the schema is modified to include a new field,
"Student_Age," in the "Students" table. With logical data independence, the applications used
by students and faculty to view and update student records do not need to be changed to
accommodate this new field. The applications will continue to function as before, without
any modification, unless the new field is specifically needed in the user interface.
37
Dr. Shweta
Importance:
● Schema Evolution: Logical data independence allows for the evolution of the
database schema as organizational needs change, without requiring a complete
overhaul of existing applications.
● User Interaction Stability: It ensures stability in user interactions with the database,
even as the underlying structure of the database evolves.
● Ease of Updating: Logical data independence makes it easier to update and maintain
the database over time, as new requirements can be integrated without disrupting
existing systems.
Focus Concerned with the physical Concerned with the structure and
storage and retrieval mechanisms. organization of the logical database
schema.
Example Moving from hard drive storage to Adding a new field to a table without
cloud storage without affecting the affecting user interfaces or
schema. applications.
Data independence is achieved through the abstraction provided by the DBMS architecture:
38
Dr. Shweta
1. Three-Level Architecture: The division into physical, logical, and view levels in
DBMS ensures that changes at one level do not necessitate changes at other levels.
This modular approach allows for greater flexibility and ease of maintenance.
2. Data Models and Schemas: The use of data models (like the relational model) and
schemas (conceptual, internal, and external schemas) allows DBMS to define data at
various levels of abstraction, thus facilitating data independence.
3. Database Languages: High-level query languages like SQL are used to interact with
the logical view of the data, abstracting away the physical storage details. This also
contributes to data independence.
Conclusion
Data Independence is a fundamental principle in DBMS that ensures that changes in data
storage or structure do not disrupt the applications or users interacting with the data.
● Physical Data Independence deals with the separation of storage details from the
logical structure.
● Logical Data Independence focuses on maintaining the stability of user interactions
despite changes in the logical organization of the data.
Together, these types of data independence allow databases to be more flexible, easier to
maintain, and capable of evolving with the needs of the organization without requiring
constant rewriting of application programs.
39
Dr. Shweta
Data Definition Language (DDL) is used to define and manage all structures within a
database. It focuses on creating, modifying, and deleting database objects like tables, indexes,
and views.
Key Functions:
● CREATE: Used to create new database objects such as tables, views, indexes, and
schemas.
● ALTER: Used to modify existing database objects, like adding a new column to a
table or changing a data type.
● DROP: Used to delete database objects, like tables or views.
● TRUNCATE: Used to remove all records from a table quickly, without removing the
table itself.
● RENAME: Used to rename a database object.
Importance:
● Schema Definition: DDL is essential for defining the structure and organization of
data within the database.
● Database Design: It allows database administrators to design and modify the
database schema according to the needs of the application.
Data Manipulation Language (DML) is used to retrieve, insert, update, and delete data
within the database. DML commands deal directly with the data stored in tables and are
typically used by end-users to interact with the database.
Key Functions:
40
Dr. Shweta
● SELECT: Retrieves data from one or more tables based on specified conditions.
● INSERT: Adds new rows of data into a table.
● UPDATE: Modifies existing data in a table based on specified conditions.
● DELETE: Removes data from a table based on specified conditions.
Importance:
● Data Interaction: DML is critical for interacting with the data stored in the database,
enabling users to perform CRUD (Create, Read, Update, Delete) operations.
● Dynamic Data Handling: It allows for the dynamic handling of data, making it
possible to modify data as needed without altering the database structure.
Data Control Language (DCL) is used to control access to the data within the database. It is
primarily concerned with granting and revoking permissions to users and roles, ensuring data
security and integrity.
Key Functions:
● GRANT: Provides specific privileges to users or roles, such as the ability to select,
insert, update, or delete data.
● REVOKE: Removes previously granted privileges from users or roles.
Importance:
● Security: DCL is essential for managing access to sensitive data, ensuring that only
authorized users can perform specific actions.
● Data Integrity: By controlling who can modify data, DCL helps maintain the
integrity and accuracy of the database.
Transaction Control Language (TCL) is used to manage transactions within the database.
A transaction is a sequence of one or more SQL operations treated as a single unit of work.
TCL commands ensure that transactions are executed in a way that maintains the consistency
and integrity of the database.
41
Dr. Shweta
Key Functions:
● COMMIT: Saves all changes made during the current transaction to the database.
● ROLLBACK: Reverts all changes made during the current transaction, restoring the
database to its previous state.
● SAVEPOINT: Sets a point within a transaction to which you can later roll back.
● SET TRANSACTION: Sets the characteristics for the current transaction, such as its
isolation level.
Importance:
● Consistency: TCL ensures that all operations within a transaction are completed
successfully before they are permanently applied to the database, maintaining
consistency.
● Recovery: In case of errors or failures, TCL commands like ROLLBACK allow the
database to recover to a stable state.
● Atomicity: TCL ensures that a transaction is atomic, meaning all operations within it
are either fully completed or fully undone.
Summary
Understanding the different database languages is crucial for effectively managing and
interacting with a database:
● DDL (Data Definition Language): Defines the structure of the database, allowing
the creation and modification of database objects like tables and schemas.
● DML (Data Manipulation Language): Enables interaction with the data, allowing
users to retrieve, insert, update, and delete data.
● DCL (Data Control Language): Controls access to the data, ensuring that only
authorised users can perform certain actions.
● TCL (Transaction Control Language): Manages transactions, ensuring that the
database remains consistent and stable, even in the face of errors.
These languages work together to provide a complete toolkit for database management,
allowing for the creation, manipulation, control, and preservation of data within a DBMS.
42
Dr. Shweta
There are several types of data models used in DBMS, each serving specific purposes. The
primary types of data models include:
The Hierarchical Data Model is one of the earliest and most straightforward data models
used in database management systems (DBMS). Developed in the 1960s, it was
predominantly used in IBM’s Information Management System (IMS). Despite its simplicity,
it laid the groundwork for more complex data models that followed.
The hierarchical data model organizes data in a tree-like structure, where each record has a
single parent and possibly many children. This parent-child relationship represents a
one-to-many relationship, where each child record is linked to one parent, but a parent can
have multiple children. This model is particularly effective for applications where data is
naturally hierarchical, such as organizational structures, file systems, and XML documents.
Key Characteristics
43
Dr. Shweta
1. Tree Structure:
○ The hierarchical model organizes data into a tree structure. The topmost node
of the tree is known as the root, and the nodes below it are referred to as
children. Each child node can have its children, and so on, creating a
multilevel hierarchy.
2. Parent-Child Relationship:
○ Every child node in this model has a single parent, which establishes a strict
hierarchy. This parent-child relationship is the fundamental building block of
the hierarchical data model.
3. One-to-Many Relationships:
○ The model efficiently handles one-to-many relationships, where one parent
node can have multiple child nodes, but each child node is linked to only one
parent.
4. Data Retrieval:
○ Data retrieval in the hierarchical model is relatively fast and efficient because
of its tree structure. Navigating from one node to another is straightforward,
following the parent-child relationships.
5. Sequential Access:
○ Accessing data in the hierarchical model often requires sequential
processing, meaning you must traverse the hierarchy from the root to the
desired node. This can make certain types of queries cumbersome, especially
if they don’t align well with the tree structure.
44
Dr. Shweta
Let’s consider a simple example of a company’s organizational structure, where the hierarchy
is defined as follows:
● Company (Root)
○ Department A (Child of Company)
■ Manager A1 (Child of Department A)
■ Manager A2 (Child of Department A)
○ Department B (Child of Company)
■ Manager B1 (Child of Department B)
■ Manager B2 (Child of Department B)
■ Employee B2.1 (Child of Manager B2)
■ Employee B2.2 (Child of Manager B2)
In this example:
45
Dr. Shweta
This hierarchical structure clearly defines relationships between various entities in the
company.
1. Simplicity:
○ The model is conceptually simple and easy to design for data that naturally fits
into a hierarchical structure.
2. Data Integrity:
○ The parent-child relationship enforces data integrity by ensuring that each
child node is directly associated with a parent node.
3. Performance:
○ For certain types of queries, especially those that naturally traverse the
hierarchy (e.g., finding all employees in a department), the hierarchical model
offers high performance due to its efficient tree traversal.
4. Data Security:
○ The strict parent-child relationship can help enforce security measures, where
access control can be managed at different levels of the hierarchy.
5. Data Independence:
○ Changes in the structure at one level of the hierarchy typically do not affect
other levels, offering a degree of data independence.
1. Rigidity:
○ The hierarchical model is inflexible. Once the hierarchy is established, it is
difficult to reorganize or modify without significant changes to the database
structure.
2. Redundancy:
○ Data redundancy can occur if a data item needs to be associated with multiple
parent records. This results in duplication of data across different branches of
the hierarchy.
3. Complex Queries:
46
Dr. Shweta
○ While the model is efficient for hierarchical queries, it can be cumbersome for
complex queries that don’t align well with the tree structure. For instance,
retrieving data that spans multiple branches of the hierarchy can be difficult.
4. Limited Relationship Representation:
○ The hierarchical model is restricted to one-to-many relationships. It cannot
efficiently represent many-to-many relationships, limiting its application in
more complex scenarios.
5. Sequential Access Requirement:
○ Since data is stored in a specific hierarchical order, access to specific nodes
often requires traversing the tree sequentially from the root. This can be
inefficient for certain types of queries or updates.
Real-Life Applications
The hierarchical data model, despite its limitations, is still used in specific applications where
data naturally fits into a hierarchy. Some real-life examples include:
1. File Systems:
○ Most operating systems use a hierarchical file system, where directories are
organized in a tree structure. For instance, the root directory contains
subdirectories, which in turn contain files or further subdirectories.
2. Organizational Charts:
○ Companies often use hierarchical models to represent their organizational
structures, where each level of the hierarchy corresponds to a different level of
management.
3. XML Data Representation:
○ XML (eXtensible Markup Language) data is often structured hierarchically,
where elements can contain nested sub-elements, resembling a tree structure.
4. Biological Taxonomy:
○ The classification of living organisms follows a hierarchical structure, from
kingdom down to species.
The hierarchical data model was a precursor to more sophisticated data models like the
network and relational models. It was primarily developed during the 1960s, a time when the
47
Dr. Shweta
requirements for data processing were simpler and more structured. IBM’s IMS (Information
Management System) was one of the first database management systems to implement the
hierarchical model.
As databases evolved to handle more complex and diverse types of data, the limitations of the
hierarchical model became apparent. This led to the development of the network model,
which allowed more flexible relationships, and eventually to the relational model, which
became the dominant model due to its simplicity and versatility.
The hierarchical data model is a foundational concept in DBMS, characterized by its tree-like
structure, parent-child relationships, and one-to-many associations. While it is simple and
efficient for certain types of data, it has significant limitations in terms of flexibility,
redundancy, and query complexity. Understanding the hierarchical model provides valuable
insights into the evolution of database systems and their application in specific real-world
scenarios.
The Network Data Model is an extension of the hierarchical data model, introduced to
address some of its limitations. Developed in the late 1960s, the network data model
organizes data into a more flexible graph structure, allowing for more complex relationships
between data elements. This model is particularly effective in scenarios where many-to-many
relationships are common, making it more versatile than the hierarchical model.
Overview
In the network data model, data is organized in a graph, where records are nodes, and
relationships between records are represented as edges (links). Unlike the hierarchical model,
where each record has a single parent, the network model allows each record to have multiple
parent and child records, enabling many-to-many relationships. This flexibility makes the
network model well-suited for applications requiring more complex relationships and data
structures.
Key Characteristics
1. Graph Structure:
48
Dr. Shweta
○ The network model uses a graph structure to represent data. Nodes in the
graph represent records, and edges represent relationships between these
records. This structure allows for more complex relationships compared to the
tree structure of the hierarchical model.
2. Many-to-Many Relationships:
○ One of the most significant advantages of the network model is its ability to
handle many-to-many relationships. A record can have multiple parents and
multiple children, making it possible to model more complex real-world
relationships.
3. Schema Flexibility:
○ The network model provides more flexibility in terms of schema design.
Relationships between records can be easily modified or added without
requiring a complete restructuring of the database.
4. Data Access:
○ Data can be accessed in various ways, depending on the relationships between
records. The network model supports both navigational and set-oriented data
access, allowing for efficient query processing.
5. Efficiency:
○ The model is efficient for certain types of queries, especially those that
involve traversing complex relationships between records.
Let’s consider a simple example of a university database, where students enroll in multiple
courses, and each course can have multiple students. This is a classic many-to-many
relationship that the network model can efficiently represent.
● Student Table:
○ StudentID (Primary Key)
○ Name
○ Major
● Course Table:
○ CourseID (Primary Key)
○ CourseName
○ Instructor
49
Dr. Shweta
In this example:
● Each student can enroll in multiple courses, and each course can have multiple
students enrolled in it.
● The "Enrollment" table serves as a linking table, representing the many-to-many
relationship between "Student" and "Course."
● The relationships are not limited to a strict hierarchy, allowing for a more flexible and
accurate representation of the data.
50
Dr. Shweta
51
Dr. Shweta
○ The complexity of the network model can lead to data anomalies, especially if
the relationships between records are not carefully managed. This can result in
inconsistencies or errors in the data.
5. Limited Adoption:
○ Despite its advantages, the network model is less widely adopted than the
relational model. This limits its use in general-purpose applications and
reduces the availability of tools and resources for working with network
databases.
Real-Life Applications
The network data model is particularly useful in scenarios where data relationships are
complex and involve many-to-many associations. Some real-life applications include:
1. Telecommunications Networks:
○ In telecommunications, the relationships between switches, routers, and other
network elements are complex and interconnected. The network model is ideal
for representing these relationships and managing network traffic.
2. Transportation Systems:
○ Transportation networks, such as airline routes, railway systems, and shipping
lanes, involve complex relationships between different modes of transport,
routes, and destinations. The network model can effectively manage and
optimize these relationships.
3. Supply Chain Management:
○ In supply chain management, products, suppliers, manufacturers, and
distributors are interconnected in a complex web of relationships. The network
model helps in tracking and managing these relationships, ensuring efficient
supply chain operations.
4. Social Networks:
○ Social networking platforms often use network data models to represent
relationships between users, such as friendships, followers, and connections.
These relationships are inherently many-to-many and can be efficiently
managed using a network model.
5. Genealogy Databases:
52
Dr. Shweta
○ Genealogy databases, which track family histories and relationships, often use
the network model to represent the complex relationships between ancestors
and descendants. This allows for efficient searching and analysis of familial
connections.
The network data model emerged in the late 1960s as a response to the limitations of the
hierarchical model. It was first formalized by the Conference on Data Systems Languages
(CODASYL) group, which developed the CODASYL DBTG (Data Base Task Group)
model. This model provided a framework for implementing network databases, which
became popular in industries requiring complex data relationships.
Over time, the network model was gradually overshadowed by the relational model, which
offered greater simplicity, flexibility, and ease of use. However, the network model remains
relevant in certain specialized applications where its ability to handle complex relationships is
essential.
The network data model is a powerful and flexible approach to managing complex data
relationships in a DBMS. Its graph-based structure allows for many-to-many relationships,
making it suitable for applications where data is interconnected in intricate ways. While it
offers significant advantages in terms of relationship representation and query efficiency, it
also comes with challenges in terms of complexity and maintenance.
Understanding the network model provides valuable insights into how databases can be
designed to handle complex, real-world data scenarios. Despite its limitations, the network
model remains a vital tool in the arsenal of database management systems, particularly for
specialized applications requiring advanced data relationship management.
The Relational Data Model is the most widely used and accepted data model in modern
database systems. Introduced by E.F. Codd in 1970, this model organizes data into tables (or
relations), where each table consists of rows and columns. The relational model is valued for
its simplicity, flexibility, and ease of use, which makes it suitable for a wide range of
applications, from small-scale to enterprise-level systems.
53
Dr. Shweta
Key Concepts
1. Table (Relation):
○ In the relational model, data is stored in tables. Each table, also known as a
relation, represents an entity, such as a "Student" or a "Course."
○ The table is made up of rows and columns, where each row represents a record
(tuple) and each column represents an attribute (field) of the entity.
2. Row (Tuple):
○ A row in a table represents a single record in the database. For example, in a
"Student" table, each row would represent an individual student, including
details such as their ID, name, and major.
3. Column (Attribute):
○ A column in a table represents an attribute of the entity. For example, in the
"Student" table, columns might include "StudentID," "Name," and "Major."
4. Primary Key:
○ The primary key is a unique identifier for each record in a table. It ensures that
each record can be uniquely identified. For example, "StudentID" in the
"Student" table might serve as the primary key.
5. Foreign Key:
○ A foreign key is a field in one table that uniquely identifies a row in another
table. It is used to establish a relationship between the two tables. For
example, the "CourseID" in the "Enrollment" table is a foreign key that links
to the "Course" table.
6. Relations Between Tables:
○ Tables in the relational model are connected through relationships, typically
using primary and foreign keys. These relationships allow data to be retrieved
and manipulated across multiple tables efficiently.
Let's continue with the university example, where we have three main entities: Students,
Courses, and Enrollments.
Tables
● Student Table:
54
Dr. Shweta
55
Dr. Shweta
Here's a diagram of the Relational Data Model using the university example. The diagram
shows three tables: Student, Course, and Enrollment. The arrows indicate the relationships
between the tables, with primary keys (PK) and foreign keys (FK) connecting them.
This diagram illustrates how the relational model organizes data into tables and how
relationships between tables are established through keys, making it easy to manage and
query related data efficiently.
The Entity-Relationship (ER) Data Model is a conceptual framework used to describe the
structure of a database. Introduced by Peter Chen in 1976, the ER model is used primarily for
database design, allowing database architects to visualize the relationships between entities in
the system. The ER model represents data in terms of entities, attributes, and relationships,
making it easier to map out the real-world scenarios that the database will need to handle.
Key Concepts
1. Entities:
○ An entity represents a real-world object or concept, such as a "Student,"
"Course," or "Instructor." Entities are the building blocks of the ER model, and
they typically correspond to tables in the relational model.
○ Entities are depicted as rectangles in an ER diagram.
2. Attributes:
○ Attributes are the properties or characteristics of an entity. For example, a
"Student" entity might have attributes such as "StudentID," "Name," and
"Major."
○ Attributes are represented as ovals connected to their respective entities in an
ER diagram.
○ Primary Key: A special attribute that uniquely identifies each instance of an
entity. In the "Student" entity, "StudentID" would be the primary key.
3. Relationships:
○ Relationships represent the associations between entities. For example, a
"Student" enrolls in a "Course," or a "Course" is taught by an "Instructor."
○ Relationships are depicted as diamonds connecting entities in an ER diagram.
56
Dr. Shweta
Let's use the same university example to create an ER model. In this example, the entities
include Students, Courses, and Instructors. The relationships include Enrollment (between
students and courses) and Teaching (between instructors and courses).
● Student:
○ Attributes: StudentID (Primary Key), Name, Major
● Course:
○ Attributes: CourseID (Primary Key), CourseName, Credits
● Instructor:
57
Dr. Shweta
Relationships
Diagram of the Entity-Relationship (ER) Data Model using the university example. This
diagram includes the entities Student, Course, and Instructor, and their relationships,
Enrollment and Teaching. The arrows and labels indicate the cardinality of these
relationships, such as one-to-many (1) and many-to-many (M).
58
Dr. Shweta
The ER model is effective for designing databases because it visually represents how
different entities are related, making it easier to understand and manage the structure of the
database.
Schemas
Instances
● Definition: An instance of a database refers to the actual data stored in the database at
a particular moment. It is the snapshot of the database content at any given time.
● Components:
○ Data Records: The actual entries in the tables.
○ Current Values: The values of the columns for the current data stored in the
database.
● Example: Using the same library database, an instance would be the actual records in
the Books table, like BookID = 1, Title = 'Database Systems', AuthorID = 3. It
represents the current state of the data in the database.
59
Dr. Shweta
Comparison
In summary, the schema defines the structure and rules for the database, while an instance
represents the actual data that exists within that structure at a particular time.
Definition The blueprint or design of the The actual data present in the
database. It defines the structure database at a specific time.
and relationships.
Purpose Provides a plan for how data Represents the current state of the
should be organized and related. data in the database.
60
Dr. Shweta
Components Tables, columns, data types, Data records (rows) in the tables.
constraints, relationships.
Visualization Like a blueprint or design plan for Like the actual books, with titles
a library. and authors, in the library.
Summary:
● DBMS Definition: A Database Management System (DBMS) is software that helps
manage, store, and retrieve data efficiently.
61
Dr. Shweta
Questions:
● Define DBMS.
● What is data redundancy, and how does DBMS help in reducing it?
● Give a real-life example of where a DBMS is used.
62
Dr. Shweta
Large Questions
1. Compare and contrast the file system with a Database Management System (DBMS)
in detail.
2. Explain the architecture of DBMS with a focus on its different layers and their
functions.
3. Describe the role of different users in a DBMS?
4. What are the advantages and disadvantages of using a DBMS? Provide examples to
support your answer.
5. Explain the concept of data independence in DBMS and differentiate between
physical and logical data independence.
6. Differentiate between file system and Database
7. Explain database schema
8. What is 3-tier architecture of DBMS
9. Explain schemas of Database
Quick Revision :
63
Dr. Shweta
64