Bitzu

CPSA ยท Web servers, architecture and protocols

Tiered web architectures

Presentation, application and database layers, logical vs physical separation.

Key points

  • Three layers: presentation (web server, browser-facing code), application (business logic on an app server), data (the database).
  • Logical separation: distinct code responsibilities, may run on one machine.
  • Physical separation: different hosts or network segments with firewalls between them.
  • Tester asks: which tier a flaw sits in, what it can reach next (web server to database), whether the database is exposed beyond the application tier.

Practice questions

Single choice

In a three-tier web application, which tier stores the persistent data?

  1. Presentation tier
  2. Application tier
  3. Data tier
  4. Client tier only
Show answer

Answer: C. Data tier

The data tier (database) holds persistent records. The presentation tier renders the interface and the application tier runs business logic.

Select all that apply

Which statements describe physical separation of tiers?

  1. The database runs on its own host in a separate network segment
  2. A firewall permits only the application servers to reach the database port
  3. Code is split into separate folders inside one project
  4. Business logic lives in its own class library loaded by the same process
  5. The UI uses a different CSS file from the admin area
Show answer

Answer: A. The database runs on its own host in a separate network segment, B. A firewall permits only the application servers to reach the database port

Separate hosts and firewalled segments are physical/network separation. Folders in one project and one-process classes are only logical separation.

True or false

True or false: if an application is built in three logical layers, the database is automatically protected from a compromised web server.

Show answer

Answer: False

False. Logical layers in code do not restrict network access; if the web host holds database credentials and can reach the database, its compromise exposes the data.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More CPSA topics in this module