Data Models and DBMS Types

What is 3 type architecture in DBMS?

The 3 type architecture in DBMS, or three-schema architecture, splits a database into external, conceptual and internal levels to limit the effect of changes.

On this page
  1. Short answer
  2. The external level
  3. The conceptual level
  4. The internal level
  5. Data independence
  6. A small example
  7. Where the name comes from

Short answer

The “3 type architecture” is usually called the three-level architecture or the three-schema architecture. It splits a DBMS into three levels of description: external, conceptual and internal. Each level describes the same data from a different point of view, and the DBMS maps between them. The main benefit is that a change at one level does not have to force changes at the others.

The external level

The external level holds the views that individual users and applications see. A sales team might see only the orders for its region, and a report might show a few columns from a much larger table. A database can have many external schemas, each limited to what its users need. This level can also control what each user may see, because a user can be granted a view without access to the underlying table.

The conceptual level

The conceptual level describes the logical structure of the whole database: the entities, their attributes, the relationships between them, and the constraints the data must follow. It leaves out storage details. The models covered in what are the types of data models in dbms are used to describe this level.

The internal level

The internal level describes how data is physically stored: the files, the record layout, the indexes, and how data is arranged on disk. Changes here, such as adding an index, can affect performance without changing the results of queries. In MySQL, the storage engine chosen for a table handles most of this, a choice explored in types of mysql tables and storage engines.

Data independence

The point of the three levels is data independence:

  • Logical data independence means the conceptual schema can change, for example by adding a table, without forcing changes to the external views and applications that do not use it.
  • Physical data independence means the internal level can change, for example by adding an index or moving data to new storage, without changing the conceptual schema.

A small example

The SQL below creates one table, one view and one index, each sitting at a different level.

CREATE TABLE customers (
    customer_id INT PRIMARY KEY,
    name VARCHAR(100),
    email VARCHAR(255),
    region VARCHAR(50)
);

CREATE VIEW customer_contacts AS
SELECT name, email
FROM customers;

CREATE INDEX idx_customers_email ON customers (email);

The table defines the conceptual level. The view is an external-level view that a support team could query without seeing the region column. The index is an internal-level detail: dropping it would not change what the view returns, only how fast some queries run. These CREATE statements are DDL, one of the groups in the dbms languages list.

Where the name comes from

The three-level idea came from an ANSI/X3/SPARC study group in 1975. It never became a formal standard, but the terms spread through textbooks and vendors adopted them. Vendors implement the levels in different ways, so a real product rarely matches the model exactly.

The complete guide to data models and dbms types

What Are the Types of Data Models in DBMS?
Read the guide

Keep exploring

Guides from other topics

All topics →