Back-End Development Basics of Back End Development 2 — Questions and Answers
Question 1: Which HTTP status code indicates that a resource was successfully created?
- 200 OK
- 201 Created (Correct answer)
- 204 No Content
- 301 Moved Permanently
Correct answer: 201 Created
201 Created is the standard response when a POST request results in a new resource being successfully created on the server.
Question 2: What is the primary role of an ORM (Object-Relational Mapper) in back-end development?
- Compressing database query results
- Mapping database tables to programming language objects (Correct answer)
- Encrypting SQL queries before execution
- Caching frequently accessed rows in memory
Correct answer: Mapping database tables to programming language objects
An ORM maps relational database tables to objects in code, letting developers interact with the database using their language's syntax instead of raw SQL.
Question 3: Which of the following best describes middleware in the context of a web server?
- A database driver that connects the server to storage
- A function that processes requests before they reach the route handler (Correct answer)
- A load balancer that distributes traffic across servers
- A caching layer between the client and the API
Correct answer: A function that processes requests before they reach the route handler
Middleware sits in the request-response pipeline and can inspect, modify, or terminate requests before the final route handler is invoked.
Question 4: What does the acronym CRUD stand for in back-end development?
- Create, Read, Update, Delete (Correct answer)
- Connect, Request, Utilize, Deploy
- Cache, Render, Upload, Download
- Compile, Run, Unit-test, Debug
Correct answer: Create, Read, Update, Delete
CRUD describes the four fundamental operations performed on persistent data: Create, Read, Update, and Delete.
Question 5: In a stateless REST architecture, where is session information typically stored?
- In a server-side in-memory variable
- Inside the database as a global table
- On the client side, often in a token or cookie (Correct answer)
- In a shared file on the server's filesystem
Correct answer: On the client side, often in a token or cookie
REST is stateless, meaning each request must carry all needed context; this is typically accomplished with tokens (e.g., JWT) or cookies sent by the client.
Question 6: Which SQL clause is used to filter rows AFTER a GROUP BY aggregation?
- WHERE
- FILTER
- HAVING (Correct answer)
- LIMIT
Correct answer: HAVING
HAVING filters groups produced by GROUP BY, while WHERE filters individual rows before aggregation occurs.
Question 7: What is the main advantage of using environment variables for configuration in a back-end application?
- They speed up database query execution
- They allow secrets and settings to be kept out of source code (Correct answer)
- They automatically encrypt API keys at rest
- They replace the need for a configuration file entirely
Correct answer: They allow secrets and settings to be kept out of source code
Environment variables externalize secrets and environment-specific settings so they are not hard-coded or committed to version control.
Which HTTP status code indicates that a resource was successfully created?