Level 0 boss: the library loans table

Step 1 of 20%

Concept · step 1 of 2

The requirements

A library wants to record its loans. The librarian wrote this down; each sentence is a test on the next step.

  • A loan records the title of the book, the member's email, the moment it was borrowed, and the day it is due back..
  • It has a late fee in dollars and cents, which starts at 0.00, and fees must add up to the cent..
  • It says whether the book has been returned. yes or no, and a new loan has not been.
Every rule maps to level 0: text, an instant, a day, exact money, yes or no, and defaults for what a new row starts with. One table, seven tests.

Starting Postgres in your browser

About 5 MB the first time, cached after that.

PostgreSQL running in your browser