DBMS Architecture & Modules
A DBMS hides physical storage behind layers. That layering is why you can change a disk or add an index without rewriting every query.
In plain English
Think of a restaurant: the menu is what you see, the kitchen is the logical database, and the pantry is the physical storage.
The one idea
Three schemas let one stored database serve many views without rewriting the data for each consumer.
A registrar, an advisor, and a student app can all read the same database through different external schemas while the physical storage changes underneath them.
By the end
- 01Explain the three-schema architecture.
- 02Distinguish logical and physical data independence.
- 03Describe the query processor and storage manager.
- 04Know the role of the DBA and end users.
The three schemas
The external schema is what a particular user or application sees: a view or subset. The conceptual schema describes the whole logical database: entities, relationships, and constraints. The internal schema describes physical storage: files, pages, indexes, and compression. Mappings between the levels translate a user query into physical operations.
external schema -> views, application-specific subsets
conceptual schema -> tables, relationships, constraints
internal schema -> files, pages, indexes, compressionData independence
Logical data independence means you can change the conceptual schema, such as adding a column or splitting a table, without breaking existing external views. Physical data independence means you can change storage, such as adding an index or moving a file, without changing the logical schema. Both depend on the mappings between schema levels.
Query processor and storage manager
The query processor parses SQL, validates it against the catalog, rewrites it into relational algebra, optimizes it using statistics and indexes, and executes the plan. The storage manager handles files, pages, buffer management, indexing, locking, and recovery. The transaction manager coordinates commits, rollbacks, and concurrency.
One database, three views
A university stores students, courses, and enrollments. Three consumers need different slices of the same data.
The registrar opens the full student record, including contact details.
The external schema exposes every approved column.
An advisor opens only advisees and their current courses.
The external schema filters rows and hides sensitive columns.
The storage team adds an index on student_id.
The conceptual and external schemas do not change; queries simply run faster.
ConclusionThe three-schema architecture separates what users see, what the database means, and how it is stored. That separation is what makes a database maintainable.
The trade-off
No free correctness.
Gain
Logical and physical independence, plus a place to enforce security.
Cost
More catalog objects, mapping logic, and a design step that cannot be skipped.
Verdict
Essential for shared systems; overkill for a single-user local file.
Recap
What to keep.
Takeaways
- +External, conceptual, and internal schemas separate users, logic, and storage.
- +Logical data independence protects views from logical schema changes.
- +Physical data independence protects the schema from storage changes.
- +The query processor parses, optimizes, and executes queries.
- +The storage and transaction managers handle pages, indexes, locks, and recovery.
Traps
- !Confusing the conceptual schema with the physical layout.
- !Thinking a view stores data; a view is usually a stored query.
- !Assuming the optimizer always picks the best plan.
Focus
- →Draw the three levels and the mappings.
- →Give one example of logical and physical independence.
- →Trace a query from SQL text to execution.
Check yourself
Before you turn the page.
Which schema describes physical storage?
What does physical data independence allow?