PDF DBMS Module 1
PDF DBMS Module 1
PDF DBMS Module 1
• Database Management System (DBMS) is a system for storing and retrieving user’s data
while considering appropriate security measures. It consists of a group of programs that
manipulate the database.
• The DBMS accepts the request for data from an application and instructs the DBMS engine
to provide the specific data. In large systems, a DBMS helps users and other third-party
software to store and retrieve data.
Introduction to Database Management System (Cont…)
• A database management system (DBMS) refers to the technology for creating and managing databases.
• A database-management system (DBMS) is a collection of interrelated data and a set of programs to access
those data. The collection of data, usually referred to as the database, contains information relevant to an
enterprise.
• Database systems are designed to manage large bodies of information. Management of data involves both
defining structures for storage of information and providing mechanisms for the manipulation of information.
In addition, the database system must ensure the safety of the information stored, despite system crashes or
attempts at unauthorized access. If data are to be shared among several users, the system must avoid possible
anomalous results.
• The primary goal of a DBMS is to provide a way to store and retrieve database information that is both
convenient and efficient.
• Basically, the database is a collection of inter-related data which is used to retrieve, insert and delete the data
efficiently. It is also used to organize the data in the form of a table, schema, views, and reports, etc.
Introduction to Database Management System (Cont…)
• DBMS allows users the following tasks:
• Data Definition: It is used for creation, modification, and removal of definition that defines
the organization of data in the database.
• Data Updation: It is used for the insertion, modification, and deletion of the actual data in
the database.
• Data Retrieval: It is used to retrieve the data from the database which can be used by
applications for various purposes.
• User Administration: It is used for registering and monitoring users, maintain data
integrity, enforcing data security, dealing with concurrency control, monitoring performance
and recovering information corrupted by unexpected failure.
Introduction to Database Management System (Cont…)
Features of DBMS:
• A user-accessible catalog of data
• Transaction support
• Concurrency control with Recovery services
• Authorization services
• The value of data is the same at all places.
• Offers support for data communication
• Independent utility services
• Allows multiple users to share a file at the same time
File system v/s Database system
• A database is generally used for storing related, structured data, with well defined data formats, in an
efficient manner for insert, update and/or retrieval.
• Where as, a file system is a more unstructured data store for storing arbitrary, probably unrelated
data. The file system is more general, and databases are built on top of the general data storage
services provided by file systems.
File System:
• A file system is a technique of arranging the files in a storage medium like a hard disk, pen drive,
DVD, etc. It helps to organizes the data and allows easy retrieval of files when they are required. It
mostly consists of different types of files like mp3, mp4, txt, doc, etc. that are grouped into
directories.
• A file system enables to handle the way of reading and writing data to the storage medium. It is
directly installed into the computer with the Operating systems such as Windows and Linux.
File system v/s Database system (Cont…)
• Data independence and data abstraction are fundamental concepts in database management
systems (DBMS) that aim to enhance the flexibility, scalability, and maintainability of
databases.
• These concepts enable the separation of logical and physical aspects of data, allowing users
and applications to interact with data at higher levels of abstraction.
• Data Independence: Data independence refers to the ability to modify the database schema
without affecting the applications or users accessing the data. It allows for changes to the
underlying database structure without requiring changes to the programs or queries that
utilize the data.
Data Abstraction and Data Independence (Cont…)
Data Independence:
• Data independence is classified into two types:
• Physical Data Independence: Physical data independence enables modifications to the physical
storage and organization of data without impacting the logical view of the data. It allows for
changes in storage devices, file systems, or indexing mechanisms without requiring alterations in
application programs or queries. This independence facilitates performance optimizations and
hardware upgrades, ensuring seamless transitions and system scalability.
• Logical Data Independence: Logical data independence enables modifications to the logical
structure of the database without affecting the external views or applications. It allows for changes
in the database schema, such as adding or modifying tables, attributes, or relationships, without
requiring modifications to the application programs or queries. Logical data independence enhances
the maintainability and flexibility of the database system, accommodating evolving business
requirements and data models.
Data Abstraction and Data Independence (Cont…)
Data Abstraction:
• Data abstraction is a concept that enables the representation of complex data in simplified
and meaningful ways, hiding the underlying complexities of data storage and retrieval.
• It provides higher-level views of data that are more intuitive and closely aligned with the
users’ perspective. Data abstraction is achieved through two main levels:
• Physical Data Abstraction: Physical data abstraction hides the physical implementation
details of data storage and organization. It allows users and applications to interact with data
without needing knowledge of how it is stored on disks or in memory. This abstraction level
provides advantages such as portability, as changes in physical storage do not impact data
access and manipulation.
Data Abstraction and Data Independence (Cont…)
Data Abstraction:
• Logical Data Abstraction: Logical data abstraction provides a conceptual view of the
database that is independent of the specific data storage and implementation details. It
allows users to interact with data through high-level operations, queries, and data models,
irrespective of the physical representation. Logical data abstraction simplifies data
manipulation and analysis, enabling users to focus on the information they need without
being concerned with the underlying complexities.
Data Abstraction and Data Independence (Cont…)
• Benefits of Data Independence and Data Abstraction: Data independence and data abstraction
offer several benefits in the context of database management systems:
• Flexibility: Data independence allows for modifications to the database schema and physical storage without
disrupting applications or users.
• Scalability: Data independence and abstraction support scalability by allowing changes in the database
structure and storage mechanisms as the volume of data increases.
• Simplified Development: Data abstraction provides higher-level views of data, enabling developers to work
with intuitive and simplified representations. It reduces the complexity of application development, query
formulation, and data analysis, leading to improved productivity and reduced development time.
• Data Security and Privacy: Data independence and abstraction allow for the implementation of security
mechanisms at the logical level, ensuring data confidentiality, integrity, and availability.
DBMS System
Architecture
DBMS System Architecture (Cont…)
• The database system is divided into three components: Query Processor, Storage Manager, and Disk
Storage.
• Query Processor: It interprets the requests (queries) received from end user via an application program
into instructions. It also executes the user request which is received from the DML compiler.
• Query Processor contains the following components –
• DML Compiler: It processes the DML statements into low level instruction (machine language), so that they
can be executed.
• DDL Interpreter: It processes the DDL statements into a set of table containing meta data (data about data).
• Embedded DML Pre-compiler: It processes DML statements embedded in an application program into
procedural calls.
• Query Optimizer: It executes the instruction generated by DML Compiler.
DBMS System Architecture (Cont…)
• Storage Manager: Storage Manager is a program that provides an interface between the data stored in the database and the
queries received. It is also known as Database Control System. It maintains the consistency and integrity of the database by
applying the constraints and executing the DCL statements. It is responsible for updating, storing, deleting, and retrieving data in
the database.
• It contains the following components –
• Authorization Manager: It ensures role-based access control, i.e,. checks whether the particular person is privileged to perform the
requested operation or not.
• Integrity Manager: It checks the integrity constraints when the database is modified.
• Transaction Manager: It controls concurrent access by performing the operations in a scheduled way that it receives the
transaction. Thus, it ensures that the database remains in the consistent state before and after the execution of a transaction.
• File Manager: It manages the file space and the data structure used to represent information in the database.
• Buffer Manager: It is responsible for cache memory and the transfer of data between the secondary storage and main memory.
DBMS System Architecture (Cont…)