0% found this document useful (0 votes)
5 views14 pages

Understanding Database Management Systems

The document provides an overview of Database Management Systems (DBMS), explaining the differences between traditional file systems and DBMS, highlighting the advantages of DBMS such as data integrity, security, and efficient data management. It categorizes types of databases, including relational and non-relational systems, and discusses their applications in real-world scenarios like banking and airline reservations. Additionally, it covers data abstraction levels, DBMS architecture, and various data models used in database systems.

Uploaded by

ABHAY Tripathi
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)
5 views14 pages

Understanding Database Management Systems

The document provides an overview of Database Management Systems (DBMS), explaining the differences between traditional file systems and DBMS, highlighting the advantages of DBMS such as data integrity, security, and efficient data management. It categorizes types of databases, including relational and non-relational systems, and discusses their applications in real-world scenarios like banking and airline reservations. Additionally, it covers data abstraction levels, DBMS architecture, and various data models used in database systems.

Uploaded by

ABHAY Tripathi
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

Database Management System

Introduction to DBMS

1. Data, Database and File System (old system)


Data is referred to as the collection of raw facts or figures that can be
processed to derive meaning or knowledge. It is a collection of information
gathered by observations, measurements, research, or analysis. In simpler
terms, Data is any fact that can be stored, e.g., "EXY", "12", etc.

Data when processed becomes Information.

Database

A database is a structured collection of interrelated data organized in a way that


enables efficient storage, retrieval, and manipulation of information. Key
characteristics of databases include:

 It is a collection of interrelated data.

 It can be stored in the form of tables.

 It can be of any size.

File System

A file system is a structure that an operating system uses to manage and organize
files on a storage device, such as a hard drive or USB flash drive. It defines how data
is organized, accessed, and stored on the storage device. The file system acts as an
interface between the user and the data.
Disadvantages of the File System

 Data Redundancy: Imagine a company using separate spreadsheets for


sales, customer contacts, and inventory. If a customer buys a product, their
information might be entered in all three spreadsheets, causing duplication.

 Poor Memory Utilization: Due to storing the same information like customer
names and phone numbers in multiple spreadsheets, memory resources are
poorly utilized.

 Data Inconsistency: If a customer's address is updated in the customer


contacts spreadsheet but remains unchanged in the sales spreadsheet, it
causes data inconsistency.

 Data Security: File systems do not ensure controlled access to sensitive data.
In DBMS, it is possible to limit access to specific data, which protects against
unauthorized access.

Database Management System (DBMS)

A Database Management System (DBMS) is software designed to manage,


manipulate, and organize large volumes of data efficiently. It acts as an interface
between the database and the users or applications, providing tools for storing,
retrieving, updating, and managing data securely.

Real-life Applications of DBMS

 Banking Systems: DBMS maintains a centralized and secure database of


customer information like personal details and transaction history. For
example, banks rely on DBMS to ensure data consistency when handling
millions of transactions.

 Airline Reservation Systems: Airlines use DBMS to manage flight schedules,


seat availability, and reservations. DBMS helps maintain data integrity across
thousands of flights and millions of passengers.
Drawbacks of File system

 Data redundancy: Data redundancy refers to the duplication of data, Data


redundancy often leads to higher storage costs and poor access time.
 Data inconsistency: Data redundancy leads to data inconsistency, lets take
the same example that we have taken above, a student is enrolled for two
courses and we have student address stored twice, now lets say student
requests to change his address, if the address is changed at one place and
not on all the records then this can lead to data inconsistency.
 Data Isolation: Because data are scattered in various files, and files may be
in different formats, writing new application programs to retrieve the
appropriate data is difficult.
 Atomicity issues: Atomicity of a transaction refers to “All or nothing”,
which means either all the operations in a transaction executes or none. It
is difficult to achieve atomicity in file processing systems.
 Data Security: Data should be secured from unauthorized access.
Both file systems and Database Management Systems (DBMS) serve the purpose
of data storage but have distinct characteristics. Here are some key drawbacks of
file systems compared to DBMS:

1. Data Redundancy and Inconsistency:


File Systems: Storing the same data in multiple files can lead to redundancy.
Without a centralized control mechanism, updates to one file may not reflect in
others, resulting in data inconsistency.

DBMS: Enforces normalization and integrity constraints, minimizing redundancy


and ensuring consistency across the database.

2. Limited Data Access and Querying Capabilities


File Systems: Typically rely on simple file operations (read, write) and do not
support complex queries. Searching for specific information can be cumbersome
and inefficient.
DBMS: Provides powerful query languages (like SQL) that allow for complex
queries, joins, and aggregations, making data retrieval more efficient.

3. Lack of Data Integrity and Security


File Systems: Implementing data integrity checks and security measures is often
manual and inconsistent. There is no built-in mechanism to enforce data types or
relationships.

DBMS: Offers robust mechanisms for data integrity (e.g., primary and foreign
keys) and security features (e.g., user permissions and roles).

4. Concurrency Control
File Systems: Handling multiple users accessing the same file can lead to conflicts
and data corruption, as file systems often lack built-in concurrency control
mechanisms.

DBMS: Provides sophisticated transaction management, ensuring data integrity


during concurrent access through locking and isolation levels.

5. Data Relationships and Structure


File Systems: Lacks a formal structure to define relationships between different
data entities, making it difficult to maintain complex data relationships.

DBMS: Supports structured data models (like relational, hierarchical) that allow
for defining and managing complex relationships between data entities.

6. Backup and Recovery


File Systems: Backup and recovery processes are often manual and can be error-
prone. There is no built-in mechanism for transaction logging, making recovery
after a failure difficult.

DBMS: Typically includes automated backup and recovery options, including


transaction logs that help restore the database to a consistent state.

7. Performance and Scalability


File Systems: Performance can degrade as the amount of data grows, especially
when searching or processing large files.

DBMS: Designed to handle large volumes of data efficiently, with indexing and
optimization techniques that improve performance.

8. Maintenance and Administration


File Systems: Often require more manual intervention for maintenance tasks,
such as data organization and cleanup.

DBMS: Provides tools for easier administration, monitoring, and maintenance of


data integrity and performance.

2. Types of Database
DBMS can be classified into two main types:
1. Relational Database Management System (RDBMS)
2. Non-Relational Database Management System (NoSQL or Non-SQL)

Types of Databases
There are several types of databases, that are briefly explained below.
 Hierarchical databases
 Network databases
 Object-oriented databases
 Relational databases
 Cloud Database
 Centralized Database
 Operational Database
 NoSQL databases
1. Relational Databases (RDBMS)

 Description: Organize data into tables with rows and columns.


 Structure: Tables with predefined schemas (e.g., SQL).
 Example: Each row is a record, and each column is a field.
 Query Language: Structured Query Language (SQL).
 Examples:
o MySQL
o PostgreSQL
o Microsoft SQL Server
o Oracle Database

2. Non-Relational Databases (NoSQL)

 Description: Designed for unstructured or semi-structured data;


schema-less.
 Subtypes:
o Key-Value Stores: Store key-value pairs.
 Example: Redis, DynamoDB.
o Document Stores: Store data as JSON or XML documents.
 Example: MongoDB, CouchDB.
o Column-Family Stores: Store data in column families rather than
rows.
 Example: Cassandra, HBase.
o Graph Databases: Store nodes and edges for relationships.
 Example: Neo4j, Amazon Neptune.

3. Hierarchical Databases

 Description: Organize data in a tree-like structure where each child has one
parent.
 Structure: Parent-child relationships.
 Example: IBM Information Management System (IMS).
4. Network Databases

 Description: Use a graph structure with many-to-many relationships.


 Structure: Allows more complex relationships compared to hierarchical
databases.
 Example: Integrated Data Store (IDS).

5. Object-Oriented Databases

 Description: Store data as objects, similar to object-oriented programming.


 Structure: Objects include data and methods.
 Examples: db4o, ObjectDB.

6. Time-Series Databases

 Description: Optimized for time-stamped or time-series data.


 Use Cases: Monitoring, IoT data, financial data.
 Examples: InfluxDB, TimescaleDB.

7. Cloud Databases

 Description: Hosted on cloud platforms for scalability and accessibility.


 Examples:
o Amazon RDS
o Google Cloud Spanner
o Azure Cosmos DB

8. Distributed Databases

 Description: Spread across multiple locations but functions as a single


database.
 Examples: Apache Cassandra, CockroachDB.
9. In-Memory Databases

 Description: Store data in memory for faster performance.


 Examples: Redis, Memcached.
1. SQL DB vs NoSQL DB --> Comparison
Choose SQL: if you need strong consistency, complex querying, and structured
data handling. Examples: Financial systems, ERP, inventory management.

Choose NoSQL: if you need high performance, scalability, and flexibility for
unstructured or semi-structured data. Examples: Social networks, big data
analytics, and real-time apps.
2. Introduction to DBMS and its Application
DBMS stands for “Database Management System”.

A DBMS is a software application that acts as an interface between the data and
the end user, allowing users to efficiently store, manage, retrieve, and
manipulate large volumes of data.

Organisation: Just like in a library, a DBMS helps organise and store data efficiently

Search and Retrieval: When someone comes to your library looking for a specific
book, you use your cataloguing system to quickly locate it. Likewise, in a DBMS,
users can perform queries to search for specific data using structured query
language (SQL) or other interfaces.

Access Control: In the library, not everyone can access every book. There are rules
in place. Similarly, in a DBMS, access control mechanisms ensure that only
authorized users can access certain data, protecting sensitive information.

Concurrency Control: Imagine multiple people trying to borrow books


simultaneously. To prevent chaos, the library has rules in place to manage this,
ensuring that each person gets the book they need without conflicts. In a DBMS,
concurrency control mechanisms manage multiple users accessing the database
simultaneously, preventing data corruption or loss.

Data Integrity: Just as you ensure that books are not damaged or lost in the library,
a DBMS ensures data integrity by enforcing rules such as constraints and
validations to maintain the accuracy and consistency of the data.

3. Need, Advantages and Disadvantages of DBMS


4. Data Abastraction in DBMS
Hiding of unnecessary complexities from users is called data abstraction.

Levels of Abstraction

There are three levels of data abstraction:

Physical Level:

This is the lowest level of data abstraction. It describes how data is stored in a
database, providing details about complex data structures.

Logical Level:

This is the middle level of the 3-level data abstraction architecture. It describes
what data is stored in the database and how it is structured.

View Level:

This is the highest level of data abstraction. It describes the interaction between
users and the database system, focusing on what users can see and access.

DBMS Architecture

3-tier Architecture
3-tier architecture is the most widely used architecture in real-world large and
complex web applications like Facebook.

Presentation Layer - Handles the user interface (frontend)

Application Layer - Manages business logic (server)

Data Layer - Manages data storage and processing (database)

In this architecture, the end user has no idea about the existence of the database
beyond the application server. Similarly, the database has no knowledge about
any other user beyond the application.

Let us imagine an online shopping scenario. Whenever you go onto a platform like
Amazon and perform an operation, such as searching for a product or adding an
item to your cart, you interact with the frontend or User Interface (UI) of the
application, which is represented by the Presentation Layer.

Any operation performed at the presentation layer gets sent to the next layer, the
Application Layer, as a request. Upon receiving the request, the application layer
interprets the request, formulates a corresponding database query, and sends it
to the Data Layer. The data layer, which stores all the data, receives the query
and executes it against the database.

Data-Model and its types


A data model in a Database Management System (DBMS) is an abstract way to
represent how data is structured and organized within a database. It shows the
logical arrangement of data and the connections between different data
components.

 Hierarchical Data Model


 Network Data Model
 Relational Data Model
 Entity-Relationship Model (ER Model)
 Object-Oriented Data Model
 NoSQL Data Model

You might also like