0% found this document useful (0 votes)
17 views16 pages

DBMS

The document provides a comprehensive overview of Database Management Systems (DBMS), detailing their historical evolution from file-based systems to modern relational and NoSQL databases. It outlines key concepts such as data integrity, relationships among data, architecture types, and features of databases, as well as the distinction between database instances and schemas. Additionally, it discusses various views of data and the importance of data abstraction in database management.

Uploaded by

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

DBMS

The document provides a comprehensive overview of Database Management Systems (DBMS), detailing their historical evolution from file-based systems to modern relational and NoSQL databases. It outlines key concepts such as data integrity, relationships among data, architecture types, and features of databases, as well as the distinction between database instances and schemas. Additionally, it discusses various views of data and the importance of data abstraction in database management.

Uploaded by

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

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.

1. Early Database Systems (1950s - 1960s)


 Manual Filing Systems: Before computers, data was stored manually in
files and ledgers.
 Magnetic Tape Storage: Early computers stored data sequentially on tapes,
making retrieval slow.
 Hierarchical Databases: IBM developed the Information Management
System (IMS) in the 1960s, which structured data in a tree-like format,
useful for batch processing but rigid in structure.
2. Relational Databases (1970s - 1980s)
 Edgar F. Codd’s Relational Model (1970): Introduced the concept of
organizing data into tables (relations), reducing redundancy.
 Structured Query Language (SQL) (1974): IBM researchers developed
SQL for querying relational databases.
 First Commercial Relational Databases (1979 - 1980s):
o Oracle (1979) was the first commercially available relational
database.
o IBM’s DB2 (1983) and Microsoft’s SQL Server (1989) followed.
3. Object-Oriented & Distributed Databases (1990s)
 Object-Oriented Databases (OODBMS): Designed to store complex data
types (e.g., images, multimedia).
 Distributed Databases: Allowed data to be stored across multiple locations
for improved availability and fault tolerance.
 Data Warehousing & Business Intelligence: Companies like Teradata
developed large-scale databases for analytics.
4. NoSQL & Big Data Era (2000s - Present)
 NoSQL Databases: Emerging with the rise of the web, NoSQL databases
(MongoDB, Cassandra) handled unstructured and semi-structured data,
scaling horizontally.
 Big Data & Hadoop (2006): Google’s MapReduce model influenced
Apache Hadoop, allowing massive data processing.
 Cloud Databases & Serverless Computing (2010s - Present): Services
like Amazon RDS, Google BigQuery, and Microsoft Azure SQL allow on-
demand database scaling.
 AI & Blockchain in Databases: Modern databases integrate AI for
predictive analysis and blockchain for secure, decentralized storage.
Database:
A Database is a collection of related data organized in a way that data can
be easily accessed, managed and updated. Any piece of information can be a data,
for example name of your school. Database is actually a place where related piece
of information is stored and various operations can be performed on it.
Database Management System (DBMS):
It is essential collection of inter related data and set of programs to access
this data. This collection of data is called Database.
The DBMS allows only one person to access at a given time.

It offers the following Services:


* Data definition :
It is a method of data definition and storage.
* Data maintenance:
It checks whether each record has fields
containing all information about one particular column.
* Data manipulation:
It allows data in the database to be inserted, updated,deleted and sorted.
* Data display:
This method helps in viewing data.
* Data integrity:
This ensures the accuracy of the data.

RELATIONSHIP AMONG THE DATA:


The relationship is defined as an association among entities.
These are :
* One-to-One:
A One-to-One (1:1) relationship means that each record in Table A is
linked to only one record in Table B, and vice versa.

* 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.

Many-to-Many (M:M) Relationship in Database


A Many-to-Many (M:M) relationship means that multiple records in
Table A can be related to multiple records in Table B, and vice versa. This is
typically implemented using a junction table (or bridge table) to break it into two
One-to-Many (1:M) relationships.

Example: Students & Courses


 One Student can enroll in multiple Courses.
 One Course can have multiple Students.

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.

DBMS Architecture Based on Data Processing


1 Centralized DBMS Architecture
 Single database stored on one server.
 All clients connect to the same database.
 Example: Traditional on-premise databases like IBM DB2.
 Pros: Easier to manage, secure.
 Cons: Single point of failure, limited scalability.
2 Distributed DBMS Architecture
 Data is spread across multiple servers or locations.
 Can be homogeneous (same DBMS) or heterogeneous (different DBMS).
 Example: Google Spanner, Apache Cassandra.
 Pros: High availability, better performance.
 Cons: Complex synchronization, consistency issues.
3 Cloud-Based DBMS Architecture
 Database hosted in the cloud, managed by providers like AWS, Azure, or
Google Cloud.
 Example: Amazon RDS, Firebase, BigQuery.
 Pros: Scalable, cost-effective, accessible.
 Cons: Dependence on internet connectivity, potential security risks.

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.

a) Data Storage and Organization


 Databases store structured data in tables, making it easy to organize and
retrieve information.
 Each table consists of rows (records) and columns (fields/attributes).
b) Data Integrity
 Ensures accuracy and consistency of data through constraints (e.g., primary
keys, foreign keys).
 Prevents duplication and maintains valid relationships between data entries.
c) Data Security
 Implements access control mechanisms such as authentication (user login)
and authorization (permissions).
 Encrypts sensitive data to protect against unauthorized access.
d) Data Redundancy Reduction
 Uses normalization techniques to eliminate duplicate data, ensuring
efficiency and reducing storage space requirements.
e) Data Scalability
 Supports large volumes of data and can scale as an organization grows.
 Can handle multiple concurrent users and high transaction loads.
f) Data Consistency
 Ensures that data remains consistent across multiple transactions and
updates.
 Uses the ACID (Atomicity, Consistency, Isolation, Durability) properties to
maintain transaction integrity.
g) Data Retrieval and Querying
 Uses query languages like SQL (Structured Query Language) to retrieve and
manipulate data.
 Allows users to filter, sort, and aggregate data efficiently.
h) Multi-user Access
 Supports multiple users accessing and modifying data simultaneously while
maintaining consistency.
 Implements concurrency control to prevent conflicts.
i) Backup and Recovery
 Provides automatic backup mechanisms to prevent data loss.
 Allows recovery of lost or corrupted data in case of system failures.
j) Performance Optimization
 Uses indexing, caching, and optimization techniques to speed up queries.
 Ensures fast data retrieval for large databases.

Database Environment

A Database Environment refers to the system in which a database operates,


including all the components that interact with it. This environment consists of:
1. Hardware – Physical devices such as servers, storage systems, and network
infrastructure that support the database.
2. Software – The Database Management System (DBMS), operating system,
and applications that interact with the database.
3. Data – The actual information stored, structured, and managed in the
database.
4. Users – Individuals or programs that interact with the database, including
administrators, developers, and end-users.
5. Procedures – Rules, policies, and workflows that govern how data is stored,
accessed, and secured.

Views Data/Data abstraction


Views Data:
Views of data refer to how different users interact with and perceive data in a
database. In a database management system (DBMS), data is represented at
different levels to provide abstraction and ensure security, efficiency, and ease of
use.
There are three primary views of data:
a) Physical View (Internal Level)
 Represents how data is physically stored on disk.
 Concerned with storage structures, file organization, indexing, and
memory allocation.
 Only database administrators (DBAs) interact with this level to optimize
performance.
 Example: A table stored as a B-tree index in a database.
b) Logical View (Conceptual Level)
 Describes what data is stored and the relationships between different data
entities.
 Independent of physical storage details.
 Used by developers and database designers to define the schema and
structure of the database.
 Example: A relational model where "Employees" and "Departments" tables
have relationships.
c) User View (External Level)
 Provides customized views of the database for different users.
 Ensures that users only see the relevant data they need.
 Used by end-users and applications.
 Example: A finance department only sees salary information, while HR sees
employee records.

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));

Key Differences Between Instance and Schema


Feature Instance Schema
The actual data stored at a The structure or design of the
Definition
specific time. database.
Change Changes frequently with data Rarely changes unless the database
Frequency modifications. structure is modified.
The rows of a table at a given The table definition and column
Example
moment. names.
Nature Temporary and dynamic. Permanent and static.

Some Common Relational Model Terms


1. Relation (Table)
 A relation is a table in a relational database.
 It consists of rows (tuples) and columns (attributes).
 Each relation has a unique name.
 Example: A table named Employees stores employee data.

2. Tuple (Row, Record)


 A tuple is a single record in a relation (table).
 Each tuple contains values for different attributes.
 Example:
(101, John Doe, HR) represents an employee record in the Employees table.

3. Attribute (Column, Field)


 An attribute represents a property or characteristic of an entity.
 Each attribute has a name and data type.
 Example: The attributes of the Employees table might include
Employee_ID, Name, and Department.

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.

7. Primary Key (PK)


 A primary key is an attribute (or set of attributes) that uniquely identifies
each tuple (row) in a table.
 It ensures uniqueness and prevents duplicate records.
 Example: Employee_ID as the primary key in the Employees table.

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.

Components of a Database System


A database system consists of multiple components that work together to store,
manage, and retrieve data efficiently. These components can be categorized into
hardware, software, data, users, and procedures.

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.

You might also like