Lecture: Lecture 12 - Introduction to DBMS
What a DBMS does
A DBMS stores database files and provides controlled access to applications. It manages data files, index files and a system catalog containing metadata such as table definitions and constraints.
Query path
For a query such as:
SELECT * FROM Students WHERE Student_ID = 123;- The optimizer checks the SQL and creates an internal representation.
- It compares access strategies, such as scanning every row or using an index.
- The access method manager performs the selected physical access.
- The buffer manager loads required pages from disk into DBMS memory.
- The result is returned to the application.
The optimizer provides data independence by allowing the physical storage strategy to change without requiring applications to be rewritten.
Other components
Concurrency control coordinates simultaneous operations. The reliability manager records information needed to recover after a crash. The components cooperate rather than performing interchangeable jobs.
Analogy
For a library request, the optimizer chooses the catalogue strategy, the access manager retrieves the book, the buffer manager keeps frequently requested pages nearby, concurrency control prevents two users from reserving the last copy incorrectly, and reliability management records completed reservations.
Retrieval questions
Why might an index be chosen? It can locate a selective record without scanning the whole table.
What does the buffer manager move? Database pages between persistent storage and DBMS memory.
Why is the system catalog important? It describes the database structures needed to interpret and access stored data.