Database Management Systems (DBMS)
1. The Problem: A File-Based Approach
Before database management systems, each application kept its own files. The consequences are the standard justification for using a DBMS, and are examined directly.
2. What a DBMS Is
A database management system is software that sits between the users and the stored data. Applications never touch the data files directly; every request passes through the DBMS.
3. Features of a DBMS
Three features are named by the syllabus. Learn what each one is and what it does.
(a) The data dictionary
The data dictionary is data about the data — metadata. It is itself stored in the database and describes its structure.
| The data dictionary holds |
|---|
| Table names and the fields in each table |
| The data type and size of every field |
| Primary and foreign keys, and the relationships between tables |
| Validation rules applied to each field |
| Access rights — which users may see or change what |
| Indexes that exist to speed up queries |
(b) The developer interface
The developer interface is the set of tools a database developer uses to build and maintain the database, rather than to query it day to day.
- Create and modify tables, fields and relationships
- Write and test SQL directly
- Define validation rules and set access rights
- Design forms and reports for end users
- Monitor performance and create indexes
(c) The query processor
The query processor receives a query, checks it and executes it. Its work has three stages:
| Stage | What happens |
|---|---|
| Parsing | The query is checked for correct syntax, and field and table names are verified against the data dictionary |
| Optimisation | The most efficient way to obtain the result is chosen — for example which index to use, and the best order in which to apply conditions |
| Execution | The plan is carried out, the data is retrieved and the result is returned to the user |
4. How a DBMS Solves the File-Based Problems
| Problem | How the DBMS addresses it |
|---|---|
| Redundancy | Data is stored once and shared; normalisation removes repetition |
| Inconsistency | With one copy of each item, an update is immediately correct for every user |
| Data dependence | Structure lives in the data dictionary, not in program code |
| Security | Access rights are set per user, per table and per field |
| Integrity | Validation rules are defined centrally and enforced on every update |
| Concurrent access | Record locking prevents two users altering the same record simultaneously |
5. Other Facilities
6. Exam Focus
Quick self-check
- State four limitations of a file-based approach.
- Define the data dictionary and list four things it stores.
- Explain what is meant by program–data independence, and how a DBMS provides it.
- Name and describe the three stages of query processing.
- Explain how a DBMS prevents two users corrupting the same record.
- Explain the difference between data redundancy and data inconsistency.