In this capstone, you’ll define an application’s data access layer to create and answer quizzes. You’ll implement its business logic and HTTP API at the end of the next unit. Your quiz application has the following requirements:
- It should read and write categories and a set of questions and answers assigned to them.
- Its users should pick a category, answer randomly selected questions about it, and receive a final score based on their performance.
Your application has access to a PostgreSQL database containing three tables called category, question, and answers. Figure 47.1 shows their table structure.
Figure 47.1 Visualization of your database schema. Primary keys are in bold, while foreign keys are linked to their reference. The entity-relationship diagram has been drawn using dbdiagram.io.
