Free tutorials & notes in Hindi & English · Clean code examples 🧰 Free PDF & Image Tools →
MySQL + SQL · Lesson 10

DBMS Architecture (1, 2, 3-Tier & Three-Schema)

In this lesson: Learn DBMS architecture — 1, 2 and 3-tier and three-schema (internal, conceptual, external) — with diagrams and examples.

What is database architecture

Database architecture describes how the parts of a database system — the user, the application, and the database — are arranged and how they talk to each other. The main models are 1-tier, 2-tier and 3-tier, differing in how many layers separate the user from the data. A separate idea, the three-schema architecture, describes the levels inside the database itself.

💡 Tiers = how many layers between user and database. Three-schema = the internal levels of the database.

1-tier architecture

In 1-tier, the user, application and database all live on one machine, with no network in between. You interact directly with the database on your own computer.

User + Application + Database  →  all on one computer

It is simple and fast for local use or learning, but not suitable for many users at once.

2-tier architecture

In 2-tier, a client application talks directly to a database server over a network.

Client app  ⇄  Database server

This is the classic client-server model. It works well for small setups, but the client is tied closely to the database, which limits security and scalability.

3-tier architecture

In 3-tier, a middle application server sits between the client and the database.

Client  ⇄  Application server  ⇄  Database server

The middle layer handles business logic and security, and hides the database from users. This is what web applications use, because it is secure, scalable, and lets many clients connect through one logic layer.

Three-schema architecture

Separate from tiers, the three-schema architecture describes levels inside the database:

  • External — how each user sees the data (views).
  • Conceptual — the overall logical structure of all tables.
  • Internal — how data is physically stored on disk.

This separation gives data independence: one level can change without disturbing the others.

Which to use

ArchitectureBest for
1-tierLocal tools, learning
2-tierSmall client-server apps
3-tierWeb and enterprise apps

Most modern applications, especially on the web, use 3-tier for security and scalability.

Common mistakes

  • Confusing tiers with the three-schema architecture. Tiers are about layers between user and data; schemas are internal levels.
  • Using 2-tier for large web apps. They need the middle layer of 3-tier.
  • Thinking 1-tier scales. It is for a single machine only.
  • Ignoring the middle layer's role. It provides logic and security in 3-tier.

Summary

  • Database architecture arranges user, application and database.
  • 1-tier: all on one machine; 2-tier: client to database directly.
  • 3-tier: a middle application server for logic and security (used by web apps).
  • The three-schema architecture describes external, conceptual and internal levels.
  • Most modern systems use 3-tier.

Next, learn the internal levels in schema vs instance, or how they stay independent in data independence.

Frequently Asked Questions

What is database architecture?
Database architecture describes how the parts of a database system are arranged — the user, the application, and the database — and how they communicate. Common models are 1-tier, 2-tier and 3-tier, which differ in how many layers sit between the user and the data.
What is the difference between 2-tier and 3-tier architecture?
In 2-tier, the client application talks directly to the database server. In 3-tier, a middle application server sits between the client and the database, adding a layer for business logic, better security and scalability.
What is 1-tier architecture?
In 1-tier architecture, the user, application and database are all on the same machine, with no network. It is simple and used for local tools or learning, but not for multi-user systems.
What is the three-schema architecture?
The three-schema architecture separates a database into three levels: external (user views), conceptual (logical structure), and internal (physical storage). This separation provides data independence, letting one level change without affecting others.
Why is 3-tier architecture used for web applications?
Web apps use 3-tier because the middle layer (application server) handles logic and security, keeps the database hidden from users, and lets many clients connect through it. This makes the system more secure, scalable and maintainable.
🔗

Share this topic with a friend

यह topic किसी दोस्त को भेजें

Found it useful? Send it to a classmate learning the same thing.

अच्छा लगा? जो दोस्त यही सीख रहा है, उसे भेज दीजिए।

Next topicData Models in DBMS Your progress: 10 / 151 (7%) · Lesson 11 / 151 Continue →

How was this lesson?

Your feedback helps us make the content better.

Write a review or suggestion (optional)

After approval, your name and city may appear publicly with your review. Please do not write your email or phone number.

▶ CodingEasily on YouTube

Learn with video lessons in easy Hindi

Featured video: RDBMS Part 3 – Class XI Commerce IT

▶ Subscribe – it’s free