Architecture of Database
Architecture of Database
Notes are
Available
Two-Level(2-tier) Architecture for a Database System
The two-tier architecture is simpler than the three-tier architecture and involves only
two layers:
1.Client (Presentation) Tier
2.Server (Data) Tier
Let's break this down with a simple and interesting example using an ATM system.
1. Client (Presentation) Tier
• What It Is: This is the user interface where users interact with the system. It could
be a desktop application, web browser, or any other front-end tool.
• Example: Think of an ATM machine where users input their card and request
transactions.
2. Server (Data) Tier
• What It Is: This tier includes the database and the database management
system. It processes requests from the client tier and performs operations on
the data.
• Example: The bank's server that processes the ATM transactions and manages
Putting It All Together
Example Scenario: A user wants to withdraw
money from an ATM.
1.Client (Presentation) Tier: The user inserts
their card into the ATM and requests to
withdraw money.
2.Server (Data) Tier: The ATM sends the
withdrawal request to the bank's server, which
processes the transaction, updates the account
balance, and sends a response back to the
ATM.
This two-tier architecture ensures that the
client handles the presentation logic, while the
server handles data storage and processing.
Three-Level Architecture for a Database System
The three-level architecture for a database system is designed to separate the user's view of the
database from the way the database is physically stored. It includes three tiers:
1.Database (Data) Tier
2.Application (Middle) Tier
3.User (Presentation) Tier
Let's break this down with a simple and interesting example using a library system.
1. Database (Data) Tier
• What It Is: This is where all the data is actually stored. It includes the physical storage of the
database on servers.
• Example: Imagine the library's storage room where all the books are kept on shelves. This
room contains every book the library owns.
2. Application (Middle) Tier
• What It Is: This tier acts as an intermediary between the user and the database. It processes
the data and ensures that the information is correctly retrieved and stored. It also contains the
business logic.
• Example: Think of the library staff working at the back office. They handle requests for books,
organize the books, and make sure that the right books are fetched from the storage room.
3. User (Presentation) Tier
• What It Is: This is the interface through which users interact with
the system. It could be a website, an application, or any front-end
tool.
• Example: This is the front desk of the library where users come to
request books, ask questions, or return borrowed books. The
staff at the front desk interacts directly with the visitors and
provides the needed services.