Advanced Databases Second Semester: Dr. Jihan A. Rasool
Advanced Databases Second Semester: Dr. Jihan A. Rasool
Second Semester
A DBMS is a set of general purpose software, that allows the user to:-
Define the database
Specifying the data types, structures and constraints for the data to be stored
Construct the database
Store the data on some storage medium that is controlled by the DBMS
Manipulate the database
Querying to retrieve specific data, updating to reflect changes in the model of the
real world, and generating reports from the data
What should the DBMS do?
1. Store data (!).
2. Control or eliminate redundancy
3. Provide program-data independence
4. Permit multiple views of the data
5. Support sharing by multiple users
6. Support sharing and integration of data between multiple applications
7. Control concurrent access to data
8. Offer various interfaces for data retrieval and manipulation
9. Be self-describing / contain its own catalogue for metadata
10. Support data abstraction
11. Allow complex relationships between objects to be represented
12. Enforce integrity constraints on the data
13. Restrict unauthorised access
14. Facilitate backup and recovery
DBMS Language
Storage Definition Language (SDL) specifies the internal schema
Many DBMS use only the DDL and DML or a comprehensive integrated language
such as SQL rather than distinct versions of the above.
Many DBMS also support a host language for the development of applications.
For Access the host language is Visual Basic for Applications.
Question?
• Question: When would it make
sense not to use a database
system?
DBMS
Architecture
DBMS Interfaces
• Processes schema
definitions
• Stores schema
descriptions in the
system catalogue
Query Compiler
• Parses and validates
queries
• Compiles queries to
internal form (query
plan)
• Passes compiled
queries to query
optimiser
Query Optimizer
• Rearranges and
reorders operations
within query plan
• Eliminates redundancies
• Identifies appropriate
algorithms and indexes
used to implement
operations
• Consults system
catalogue for statistical
and other information
• Generates executable
code
Pre-compiler
• Extracts DML
commands from
application
programs and Precompiler
sends them to the
DML compiler
DML Compiler
• Compiles DML
into executable
code that can be
sent to the
runtime
processor
Runtime Database Processor
• Executes privileged
commands
• Executes query
plans from the
query optimiser
• Accesses database
through stored
data manager
Stored Data Manager
• Controls access
to information
on disc, using
basic operating
system services
Other Component Modules
• Loading utility is used to load files into DB
• Backup utility dumps DB to secondary storage
(tape, typically)
• Recovery utility deals with failure using backup
information
• File reorganisation utility improves performance
• Performance monitoring provides statistics for
DBA to decide whether to reorganise