Introduction of DBMS: A Database Management System (DBMS) is a software system that is designed to
manage and organize data in a structured manner. It allows users to create, modify, and query a
database, as well as manage the security and access controls for that database.
Some key features of a DBMS include:
1. Data modeling
2. Data storage and retrieval
3. Concurrency control
4. Data integrity and security
5. Backup and recovery
6. RDBMS
File System Approach:
The file system approach, also known as the flat-file approach, is an early method of data management
that involves storing data directly in individual files. This approach was commonly used in the early days
of computing when data volumes were relatively small and complex data relationships were not as
prevalent.
DBMS Architecture:
Database Management System (DBMS) architecture refers to the overall structure that defines how a
database system is organized and operates. The architecture of a DBMS includes various components
and layers that work together to manage and provide access to the database. The architecture of a
DBMS plays a crucial role in determining its performance, scalability, and security.
Types of DBMS Architecture:
There are three primary types of DBMS architectures:
1. Single-tier Architecture: In a single-tier architecture, all components of the DBMS reside on a single
computer system. This architecture is typically used for small-scale applications or for learning purposes.
2-tier architecture: In a 2-tier architecture, there are two tiers: the presentation tier and the database
tier. The presentation tier is responsible for displaying data to the user, while the database tier is
responsible for storing and retrieving data.
3-tier architecture: In a 3-tier architecture, there are three tiers: the presentation tier, the application
tier, and the database tier. The presentation tier is responsible for displaying data to the user, the
application tier is responsible for processing user requests and interacting with the database, and the
database tier is responsible for storing and retrieving data.
Three schema Architecture:
The three schema architecture is also called ANSI/SPARC architecture or three-level architecture. This
framework is used to describe the structure of a specific database system. The three schema
architecture is also used to separate the user applications and physical database. The three schema
architecture contains three-levels. It breaks the database down into three different categories.
The three-schema architecture is as follows:
In the above diagram:
o It shows the DBMS architecture.
o Mapping is used to transform the request and response between various database
levels of architecture.
o Mapping is not good for small DBMS because it takes more time.
o In External / Conceptual mapping, it is necessary to transform the request from
external level to conceptual schema.
o In Conceptual / Internal mapping, DBMS transform the request from the conceptual
to internal level.
Mapping between Views:
Mapping between views refers to the process of associating or linking different views within the
database. Views are virtual tables derived from the result of a SELECT query, and they provide a way to
present data from one or more tables in a specific manner without changing the underlying data.
Mapping between views is essential for maintaining consistency, integrity, and efficiency in a relational
database.
There are basically two types of mapping in the database architecture:
External-Conceptual Mapping: This mapping defines the correspondence between the external schema,
which represents the user view of the data, and the conceptual schema, which represents the global
view of the data. It specifies how the conceptual entities, attributes, and relationships are represented in
the external views.
Conceptual-Internal Mapping: This mapping defines the correspondence between the conceptual
schema and the internal schema, which represents the physical storage of the data. It specifies how the
conceptual entities, attributes, and relationships are translated into the physical storage structures,
including data types, indexes, and access methods.
Data Models:
 Data models in DBMS are fundamental tools for representing the structure and organization of data in a
database management system (DBMS). It defines the way data is stored, accessed, and managed.
Different data models have been developed over the years to address specific requirements and
challenges.
1) Relational Data Model: The relational data model is based on mathematical set theory and represents
data as tables (relations).Tables consist of rows (tuples) and columns (attributes). Relationships between
tables are established using keys.The relational model, introduced by Edgar Codd, is widely adopted and
forms the basis for relational database management systems (RDBMS).
2) Entity-Relationship Data Model: The ER model is a high-level conceptual model that focuses on
representing entities, their attributes, and the relationships between entities. It is often used in the early
stages of database design to create an abstract representation of the data and its relationships.
3) Object-based Data Model: The object-oriented data model (OODM) is a data model that represents
data as objects, which encapsulate both data and its associated behavior. This approach closely mirrors
the real-world concepts of objects and their interactions, making it well-suited for modeling complex and
interconnected data.Thus, in 1980s, various database systems following the object-oriented approach
were developed. Here, the objects are nothing but the data carrying its properties.
4) Semistructured Data Model: A semi-structured data model is a data model that represents data in a
flexible and self-descriptive manner. Unlike structured data, which adheres to a rigid schema, semi-
structured data allows for variations in the structure and organization of data elements. This flexibility
makes it suitable for managing data that is inherently unstructured or evolves over time.
Database Schema:
A database schema is a blueprint or a structural plan that defines the organization, structure, and design
of a database. It provides a logical and conceptual framework for how data is stored, organized, and
accessed within a database management system (DBMS). The schema defines the tables, fields,
relationships, and constraints that make up the database.
A database schema can be divided broadly into two categories −
Physical Database Schema − This schema pertains to the actual storage of data and its form of
storage like files, indices, etc. It defines how the data will be stored in a secondary storage.
Logical Database Schema − This schema defines all the logical constraints that need to be applied on
the data stored. It defines tables, views, and integrity constraints.
Database Instance:
A database instance refers to a specific occurrence or snapshot of a database at a
particular point in time. It is the actual running environment of a database system,
including the data stored, the software and processes running, and the current
configuration settings. When a database management system (DBMS) is started
and operational, it creates an instance of the database.
Data Independence:
Data independence refers to the capacity to make changes to the database schema
at one level of a database system without affecting the schema at the next higher
level. The concept is closely associated with the organization and design of a
database and is generally classified into two types: logical data independence and
physical data independence.
Logical Data Independence: Logical data independence refers to the ability to
modify the conceptual schema (the logical structure and organization of the data)
without affecting the external schema (the way data is presented to applications
and users). Changes to the logical schema might include adding or removing
tables, modifying relationships, or changing attributes. With logical data
independence, these changes should not require modifications to the applications
or queries that interact with the database.
Physical Data Independence: Physical data independence refers to the ability to
modify the internal schema (the physical storage and access structures) without
affecting the conceptual or external schemas. Changes to the physical schema
might involve reorganizing data storage, altering indexing strategies, or migrating
to a different storage system. The goal is to make these changes transparent to the
higher-level views of the data.
Database Languages in DBMS:
Database languages are specialized programming languages designed to interact
with databases, allowing users to create, manipulate, retrieve, and manage data
stored within a database management system (DBMS).
Types of database languages:
Data Definition Language (DDL): DDL is used to define and manage the structure
of the database. It includes commands for creating, altering, and deleting database
objects, such as tables, indexes, and views. DDL statements are typically used by
database administrators during the database design phase. Common DDL
commands include:
CREATE: Used to create database objects (e.g., tables, indexes).
ALTER: Used to modify the structure of existing database objects.
DROP: Used to delete database objects.
Data Manipulation Language (DML): DML is used to retrieve, insert, update, and
delete data within the database. It allows users to interact with the data stored in
the database and modify it as needed. Common DML commands include:
SELECT: Used to retrieve data from one or more tables.
INSERT: Used to add new records to a table.
UPDATE: Used to modify existing records in a table.
DELETE: Used to remove records from a table.
Data Control Language (DCL): DCL is concerned with the control and
management of access to data within the database. It includes commands for
granting or revoking permissions and privileges. DCL commands are crucial for
ensuring data security and integrity. Common DCL commands include:
GRANT: Used to give specific privileges to users or roles.
REVOKE: Used to take back privileges that were granted.
Transaction Control Language (TCL): Transaction Control Language (TCL) is a
specialized language used in database management systems (DBMS) to manage
and control transactions. Transactions are sequences of operations that manipulate
data within a database, ensuring the integrity and consistency of the data
throughout the process. TCL commands allow users to define, start, execute, and
commit or rollback transactions, ensuring that the database remains in a
consistent state even in the event of errors or failures.