Difficulty: Easy
Correct Answer: To allow a client request to access and interact with the database securely.
Explanation:
Introduction / Context:
Most web applications require dynamic content driven by data. A server-side extension (for example, CGI, servlets, PHP, ASP/ASP.NET, Node.js server code) bridges the HTTP request with application logic and database access on the server.
Given Data / Assumptions:
Concept / Approach:
Static HTML can be served by a web server with no application runtime. However, querying or updating a database requires code running on the server to accept input, validate it, enforce permissions, execute SQL, and render a response. This code is the server-side extension (or application tier), and it prevents direct, unsafe database exposure to the Internet.
Step-by-Step Solution:
Verification / Alternative check:
Common frameworks (Django, Spring, ASP.NET, Laravel) all provide server-side handlers and database access layers, demonstrating this architecture pattern.
Why Other Options Are Wrong:
Common Pitfalls:
Exposing databases directly to clients, which is insecure and bypasses validation/authorization layers.
Final Answer:
To allow a client request to access and interact with the database securely.
Discussion & Comments