DBMS
DBMS
History of Database
Before databases, data was stored in file-based systems. These were simple
collection of records where data had to be managed manually. However, file-based
systems were inefficient and difficult to maintain
In 1960 :IBM introduced the first general-purpose DBMS called
IMS(Information Management System).in 1966,which was hierarchical in nature.
The real breakthrough came in 1970 when Edgar F. Codd, an IBM
researcher, introduced the relational database model in his famous paper "A
Relational Model of Data for Large Shared Data Banks." In this model, data is
organized in tables (or relations) where each row is a record and each column is an
attribute. The relational model provided a way to store and retrieve data efficiently
using mathematical set theory.
Structured Query Language (SQL): SQL, a declarative language for
managing relational databases, was developed by IBM in the 1970s as part of its
System R project. SQL became the standard language for interacting with
relational databases.
Oracle: In 1979, Oracle Corporation (then known as Relational Software,
Inc.) released the first commercially available relational database management
system (RDBMS). This marked the beginning of commercial database software.
Other Relational DBMSs: Throughout the 1980s, other companies and
organizations developed relational database systems, including IBM's DB2,
Microsoft SQL Server, and Ingres.
* One-to-Many(1:M):
A One-to-Many (1:M) relationship means that one record in Table A is
related to multiple records in Table B, but each record in Table B is related to only
one record in Table A.
DBMS
The software which is used to manage database is called Database
Management System (DBMS). For Example, SQL Server, MySQL, Oracle etc. are
popular commercial DBMS used in different applications.
DBMS Architecture
Database Management System (DBMS) architecture defines the structure,
components, and interactions of a database system. It determines how data is
stored, managed, and accessed by users and applications.
Types of DBMS Architecture
1-Tier Architecture (Single-Tier)
The database and application reside on the same machine.
Used in small applications, testing, and local development.
Example: MS Access, SQLite.
Pros: Simple, fast for single-user access.
Cons: Not suitable for multiple users or large-scale systems.
2-Tier Architecture (Client-Server)
Client: Sends queries and requests data.
Server: Processes the request and sends results back.
Application and database are separated but communicate directly.
Example: MySQL, Oracle with desktop applications.
Pros: Faster than 1-tier, supports multiple users.
Cons: Scalability issues in high-load environments.
3-Tier Architecture (Most Common)
Presentation Layer (Client): User interface (UI), web or mobile apps.
Application Layer (Middleware): Processes business logic and database
queries.
Database Layer: Stores and manages data using a DBMS.
Example: Web applications (Amazon, Netflix using MySQL, MongoDB,
etc.).
Pros: Scalable, secure, better load balancing.
Cons: More complex and requires more resources.
Features of a Database
A database is an organized collection of data that allows users to efficiently
store, retrieve, manage, and manipulate data. Databases are widely used in various
applications, including business, healthcare, finance, and more.
Database Environment
Data abstraction
Data abstraction refers to hiding the details of how data is stored and
maintained while providing only necessary details to users. This simplifies
database usage and enhances security.
Levels of Data Abstraction:
1. Physical Level (Lowest Level)
o Deals with actual data storage and indexing methods.
o Hides complex details like data structures, paths, and hardware
implementation.
2. Logical Level (Middle Level)
o Defines data relationships, tables, attributes, and constraints.
o Focuses on how data is logically organized.
3. View Level (Highest Level)
o Defines different views for different users.
o Ensures security by restricting access to certain data.
nstances and Schemas in a Database
1. Instance in a Database
An instance refers to the actual data stored in a database at a particular moment in
time. It is a snapshot of the database contents. Since data keeps changing
(inserting, updating, deleting), the database instance also changes over time.
Dynamic – Changes frequently as new data is added or removed.
Example: A database table Students might have different student records
today compared to last week.
Example of a Database Instance
Student_ID Name Age Course
101 Ram 20 CS
102 Kumar 21 IT
103 Vetri 19 CS
If a new student joins, the instance updates.
2. Schema in a Database
A schema is the structure or blueprint of a database that defines how data is
organized. It includes tables, relationships, data types, and constraints. Unlike
instances, the schema is static and does not change frequently.
Defines the logical structure of the database.
Includes tables, attributes, primary keys, foreign keys, and
relationships.
Rarely changes unless the database design is modified.
Example of a Schema (Structure of the Students Table)
CREATE TABLE Students (Student_ID INT PRIMARY KEY,
Name VARCHAR(50), Age INT,
Course VARCHAR(30));
4. Domain
A domain is the set of all possible values an attribute can have.
It defines data integrity by restricting allowed values.
Example: The Gender attribute might have a domain {Male, Female,
Other}.
5. Degree (Arity)
The degree of a relation is the number of attributes (columns) in a table.
Example:
o A relation with 3 attributes has degree = 3.
o The table Students(Student_ID, Name, Age, Course) has degree = 4.
6. Cardinality
Cardinality refers to the number of tuples (rows) in a relation (table).
Example: If an Employees table has 50 records, its cardinality is 50.
A database schema
It is the structure that defines how data is organized in a database. It
includes tables, columns, data types, constraints, relationships, indexes, and other
elements.
A database schema can be divided broadly into two categories:
1. Physical Schema
Defines how data is stored at the physical level (disk storage, partitions,
indexes).
Includes storage engines, file organization, and indexing strategies.
2. Logical Schema
Defines the structure of the database (tables, relationships, constraints)
without concern for physical storage.
Focuses on how data is organized and its constraints.
1. Hardware
The physical devices that support the database system, including:
Servers – Store and manage the database.
Storage Devices – Hard drives (HDD, SSD), cloud storage, RAID systems.
Networking Devices – Routers, switches for data access and sharing.
Processing Units (CPUs & RAM) – For handling database queries and
transactions efficiently.
2. Software
The programs that control and manage the database system, including:
Database Management System (DBMS) – Software like MySQL,
PostgreSQL, Oracle, MongoDB, etc.
Query Language – SQL for relational databases, NoSQL for non-relational
databases.
Operating System (OS) – Linux, Windows Server, etc., which hosts the
DBMS.
Application Software – Web apps, reporting tools (Power BI, Tableau), or
enterprise applications that interact with the database.
3. Data
The most critical part of the database system, consisting of:
User Data – The actual stored information (e.g., customers, orders,
products).
Metadata – Data about data (e.g., table structure, constraints, indexes).
Indexes – Structures that improve search performance.
Transaction Logs – Records of changes for recovery purposes.
4. Users
Different types of users interact with the database:
Database Administrators (DBAs) – Manage and maintain the database.
Developers – Write queries, design schemas, and develop applications.
End Users – Access and use the database via applications (e.g., employees,
customers).
Data Analysts – Extract insights using SQL queries or analytics tools.
5. Procedures & Policies
The rules and protocols that govern database operations:
Backup & Recovery Procedures – To prevent data loss.
Security Policies – User authentication, encryption, access control.
Normalization Rules – To maintain database efficiency and integrity.
Concurrency Control – Managing multiple users accessing data
simultaneously.