Nareman Hamdan
CH1 and Ch2
Intro to Database
Objectives
KEY BENEFITS OF DBMS DBMS STRUCTURE EVOLUTION OF DBMS
Key Benefits of
DBMS
- DBMS provides:
o Persistence
o Efficient
o Reliable
o Convenient
o Safe
o Multi-user
Persistence
• Always Available
Data is stored permanently in the database, even after the
program ends.
•Durable Across Sessions
Data stays safe even if the program crashes or the system
reboots.
•Multiple Programs Accessing Data
DBMS lets multiple applications work with the same data at the
same time, ensuring it stays consistent and accurate.
Efficient
•Fast Data Access
Data is organized and indexed for quick
retrieval, even with large amounts of data.
•Handles High Traffic
Can process thousands of queries and updates
per second, ensuring fast responses for many
users.
•Efficient Query Execution
Handles complex queries like joins and
calculations efficiently.
Performance Performance Performance
Security
1 2 3 4
Authorized Access Only Data Encryption Fine-Grained Access Auditing and Monitoring
Only Sensitive data Control Tracks who
authorized users can is encrypted, both when Users get accesses or changes data,
access sensitive data, stored and during transfer, specific permissions based ensuring accountability
using passwords, to keep it private. on their roles, restricting and preventing
biometrics, or tokens. access to certain data. unauthorized actions.
High Availability
• Ensures 24/7 uptime, minimizing
downtime.
Fault Tolerance
Reliable • Quickly recovers from failures, with
backups and replication.
99.99999999% Uptime
• Guarantees near-perfect availability for
critical applications.
Physical Data Independence
• Programs don’t need to know how data is stored on
disk.
• Changes in storage structure don’t require updates
to programs.
Convenient High-Level Query Language
• Declarative queries (e.g., SQL) let you describe what
data you want, not how to retrieve it.
Simplified Data Management
• The DBMS automatically handles data retrieval,
making it easier to work with large volumes of data.
In case of hardware failure or
software failure, power
outages
• Will not be lost
Safe • Will not be overwritten
Have many measures to ensure
that data will remain
consistent regardless of what
happened
Multi-user
Multiple programs operate on the same database
One program might allow many users or applications to access the data at the same
time
Mechanisms are used to ensure - This mechanism is called concurrency control.
consistency - Control the way multi-user accessing data at the same time
- Computer memory is growing very very fast
Access to massive amounts of persistence - The amount of data in the world is growing faster
- The amount of data we handle these days is larger than what can fit in a typical
data (terabytes of data) computing system.
- Database systems are designed to handle data that resides outside of memory
Which of the A)Performance:
Handles thousands of
following is queries and updates
NOT a key per second.
feature of a B) Persistence:
Database Ensures data remains
stored and available
Management even after a program
stops.
System
(DBMS)? C) Reliability: Ensures
the system is always
up and available, even
with power outages.
D) Complexity: Forces
the user to manually
manage data storage
and retrieval
algorithms.
Which feature
of a DBMS
ensures that
data is always A) Performance
available,
even if the B) Persistence
program stops C) Convenience
running?
D) Multi-user
capability
Architecture of DBMS
Connection and Security Manager
Connection Manager Security Manager
Sets up database connections (local or network). Verifies user privileges for access.
Verifies logon credentials and returns a Controls read and write access to data.
connection handle.
DDL Compiler
•Compiles data definitions specified in DDL (Data Definition
Language).
•Parsing: Checks syntax of DDL definitions.
•Translation: Converts definitions to an internal format
and generates errors if needed.
•Catalog Registration: Registers definitions in the catalog
after successful compilation.
The Query Processor helps run
database queries, such as retrieving,
inserting, updating, or deleting data.
Query
Processor
Key Components:
DML Compiler: Query Parser:
Query Rewriter:
Converts the Breaks down the Query Optimizer:
Makes the query Query Executor:
database query to Chooses the fastest
more efficient by Runs the query and
commands into a understand its way to execute the
rewriting it in a gets the results.
format the system structure and query.
better form.
can understand. check for errors.
Storage Manager
Manages how data is
stored physically and
ensures it’s stored Key Components:
efficiently and
correctly.
Buffer Manager: Lock Manager: Recovery Manager:
Transaction Manager:
Manages data in Controls access to Handles recovery in
Ensures transactions
memory (cashe), data by different case of system failures
are processed
making sure it’s users, preventing to ensure data isn’t
correctly and safely.
quickly accessible. conflicts. lost.
Which
component is
responsible
for managing
the actual A)Transaction
Manager
physical
storage of B) Buffer Manager
data in the
database? C) Storage Manager
D) Recovery
Manager
Which
component of
the Storage
Manager
A) Transaction
ensures data Manager
is efficiently
stored in B) Buffer Manager
memory for
quick access? C) Storage Manager
D) Recovery
Manager
Evolution of
Database
• 1. Flat file system
• 2. Hierarchical database(1960)
• 3. Network database (1970)
• 4. Relational database(1980)
• 5. Object-oriented database
(1990)
• 6. NoSQL database (2000)
• 7. NewSQL Database
Flat File
system
Small databases that are
shared by one or two users
can be managed by text
file or spread sheet
Flat File • Data stored in a simple text file (No DBMS)
System + Easy to create
Limitation
of file system
•1. Performance Issues
• Hard to manage and search through data.
• Data redundancy: Duplication of data increases storage and maintenance costs.
• Simultaneous access issues: Multiple users accessing data at the same time can cause
slowdowns.
•2. Security Risks
• Concurrency problems: What happens if two instructors access the same grade file at the same
time (e.g., one adding extra credit while the other calculates GPA)?
• Poor data security: Sensitive data is vulnerable without proper access control.
•3. Data Inconsistency
• Recovery issues: In case of system failure, recovering inconsistent or lost data is difficult.
•4. Limited Data Sharing
• Limited collaboration: Sharing data is cumbersome in file-based systems without advanced
controls.
Hierarchical
Database
• Introduced in 1960
• Data organized in a tree-like structure.
Network
Database
• In 1970
• Allow complex relationships between
data.
• Uses graph structure.
• More flexible than Hierarchical
structure.
Relational
Database
• In 1980.
• Very popular
• Stores data in tables.
• Uses SQL to manage data.
Object-oriented
Database
• In 1990.
• Handle complex data types like
multimedia.
• Stores data as objects.
NoSQL Database
- In 2000.
- Highly scalable and flexible.
- Examples: MongoDB and Cassandra DB
NewSQL Database
- Handle large amount of data that grows easily.
- Offer accuracy and reliability.
- Examples: Google spanner
Which
database type
was
introduced in
the 1970s and A) Flat file system
uses a
B) Hierarchical
network of database
connected
records? C) Network database
D) Relational
database
Which of the
following is
known for
A) Flat file system
storing data
in tables and B) Hierarchical
database
was
popularized C) Network
database
in the 1980s?
D) Relational
database
Which of
the A) It automatically
following is recovers lost data.
a limitation B) It supports
complex
of the flat relationships
between data.
file
system? C) It can lead to data
redundancy and
inconsistency.
D) It allows efficient
querying of large
datasets.