CSC 480 · Database Management
Our notes
2 min readThe three-level (ANSI-SPARC) architecture
- External level: each user's view of the data (the bursary sees fees, the exams office sees results).
- Conceptual level: the whole database for the organisation: all entities, attributes, relationships and constraints, independent of storage.
- Internal level: how data is physically stored: files, records, indexes, compression.
Each level is described by a schema; mappings link external to conceptual and conceptual to internal.
A schema is the design (fixed for long periods); an instance (state) is the data at a given moment.
Data independence
Changing one level without having to change the level above.
- Logical data independence: change the conceptual schema (add an attribute or table) without changing external views or the programs using them.
- Physical data independence: change the internal schema (new index, different file organisation, move to an SSD) without changing the conceptual schema.
Physical independence is easier to achieve; logical independence is harder because programs often depend on table structures.
This is what UNIPORT's old file systems lacked: a new field forced every program to be changed.
Functions of a DBMS (Codd's list, summarised)
- Data storage, retrieval and update.
- A user-accessible catalogue (data dictionary) describing the data.
- Transaction support (all or nothing).
- Concurrency control (many users at once).
- Recovery after failures.
- Authorisation (security).
- Integrity enforcement.
- Support for data communication and utilities (import, export, backup, monitoring).
Components
Query processor (parser, optimiser), storage manager (buffer manager, file manager, transaction manager, lock manager, recovery manager), and the catalogue.
Languages: DDL (data definition: CREATE, ALTER, DROP), DML (data manipulation: SELECT, INSERT, UPDATE, DELETE), DCL (data control: GRANT, REVOKE).
Architectures
- Centralised: one machine.
- Two-tier client-server: client application + database server.
- Three-tier: browser → web/application server (PHP, Java) → database server. Most web apps (including a PHP site on XAMPP with MySQL) follow this.
- Distributed and cloud databases: data spread over several sites, replicated for availability.
Exams usually ask: draw and explain the three-level architecture; define and distinguish logical and physical data independence with examples; schema versus instance; functions and components of a DBMS; two-tier versus three-tier architecture.
Common mistake: mixing up logical and physical independence. Logical = conceptual change hidden from views; physical = storage change hidden from the conceptual level.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
Read
-
NOUN CIT 843: Introduction to Database Management Systems
NOUN course book (PDF, about 2 MB). Nigerian course book: database concepts, DBMS architecture, data models, the relational model, SQL, normalisation and transactions.
(opens nou.edu.ng in a new tab)
-
Three-schema approach
(opens en.wikipedia.org in a new tab)
Wikipedia, Three-schema approach, CC BY-SA 4.0 · licence
-
Data independence
(opens en.wikipedia.org in a new tab)
Wikipedia, Data independence, CC BY-SA 4.0 · licence
Watch
-
Best pick Three-Schema Architecture & Data Independence
7 min · ≈ 32 MB · about ₦18
(opens youtube.com in a new tab)
-
Three Tier Architecture
11 min · ≈ 50 MB · about ₦28
(opens youtube.com in a new tab)
-
Instances and Schemas in DBMS
10 min · ≈ 45 MB · about ₦25
(opens youtube.com in a new tab)
-
Lec-4: 2 tier and 3 tier Architecture with real life examples | Database Management System
13 min · ≈ 59 MB · about ₦33
(opens youtube.com in a new tab)
-
#03 - Database Storage: Files & Pages ✸ Neon Database Talk (CMU Intro to Database Systems)
1 h 22 min · ≈ 369 MB · about ₦207
(opens youtube.com in a new tab)
We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.