Data Abstraction (Physical, Logical, View Levels)
Data abstraction is the practice of hiding the low-level details of how data is physically stored and presenting users and applications with a simpler view. A DBMS provides three levels: the physical level (how data is stored), the logical level (what data is stored and how it relates), and the view level (a simplified, often partial view for each user).
Data abstraction is the idea of hiding the complex, low-level details of how data is actually stored, and instead presenting users and applications with a simpler, more meaningful view. A DBMS achieves this through three distinct levels of abstraction, each hiding more detail than the one below it.
The three levels
Physical level (internal level). This is the lowest level, describing exactly how data is physically stored: file structures, block sizes, indexing structures on disk, compression. Almost no application developer or end user ever interacts with this level directly; it's the DBMS's own internal concern.
Logical level (conceptual level). This describes what data is stored and the relationships between it, tables, columns, data types, constraints, without describing how it's physically stored on disk. This is the level a database administrator or backend developer typically works at when designing a schema.
View level (external level). This is the level closest to the end user or application. It presents a simplified, often partial, view of the data, hiding columns or details that aren't relevant to that particular user or use case. Different applications or user roles can have entirely different views of the same underlying data.
Why three levels, not just one
Separating these levels means a change at one level doesn't necessarily force a change at another. This is called data independence, and it comes in two forms:
- Physical data independence: you can change how data is physically stored (switch storage engines, change an index type, move to different disk hardware) without needing to rewrite the logical schema or any application code.
- Logical data independence: you can change the logical schema itself (add a new table, add a column) without breaking every view built on top of it, as long as existing views aren't relying on the specific thing that changed.
A worked example
Consider an employees table at the logical level with columns: id, name, salary, ssn, department_id, hire_date.
At the physical level, the DBMS might be storing this table's data in 4KB disk pages, with a B-tree index on id and a separate index on department_id, none of which any application developer needs to think about day to day.
At the view level, two very different views can be built on that same underlying table:
- An HR dashboard view exposes
name,salary,ssn, andhire_datesince HR staff need full access. - A general company directory view exposes only
nameanddepartment_id, hidingsalary,ssn, andhire_dateentirely from regular employees browsing a colleague directory.
Both views are reading from the exact same physical data and the exact same logical table; they just present different slices of it. If the DBA later decides to add a new manager_id column at the logical level, neither existing view breaks, since neither one referenced that column.
Where this matters in real systems
This three-level separation is why a company can migrate its database engine, say from on-premise PostgreSQL to a managed cloud version, changing physical storage entirely, without every application that queries the database needing to be rewritten, as long as the logical schema and views stay the same. It's also the theoretical basis for SQL VIEW objects, which are a direct, practical implementation of the view level: a saved query that presents a customized slice of the underlying tables to whoever queries it.
What interviewers actually ask about data abstraction
- "What are the three levels of data abstraction in a DBMS?" Physical (how data is stored), logical (what data is stored and how it relates), and view (what a specific user or application sees).
- "What's the difference between physical and logical data independence?" Physical independence means storage changes don't affect the logical schema; logical independence means schema changes don't necessarily break existing views.
- "Why does this separation matter in practice?" It lets different parts of a system change independently, storage engines, schemas, and user-facing views, without a change in one forcing a rewrite everywhere else.
- "How does a SQL
VIEWrelate to this concept?" AVIEWis a practical, concrete implementation of the view level: a stored query exposing a customized subset of the underlying data.
Key takeaways
- Data abstraction hides storage complexity behind simpler, higher-level representations.
- The three levels are physical (storage details), logical (schema and relationships), and view (what a specific user sees).
- Physical data independence lets storage change without affecting the schema; logical data independence lets the schema change without breaking every existing view.
- SQL
VIEWobjects are a direct real-world implementation of the view level.
More in Introduction
Browse all DBMS topics
Log in to save which topics you've read across every subject.
Frequently asked questions
What are the three levels of data abstraction in a DBMS?
Physical (how data is stored), logical (what data is stored and how it relates), and view (what a specific user or application sees).
What's the difference between physical and logical data independence?
Physical independence means storage changes don't affect the logical schema; logical independence means schema changes don't necessarily break existing views.
Why does this separation matter in practice?
It lets different parts of a system change independently, storage engines, schemas, and user-facing views, without a change in one forcing a rewrite everywhere else.
How does a SQL `VIEW` relate to this concept?
A `VIEW` is a practical, concrete implementation of the view level: a stored query exposing a customized subset of the underlying data.