bubble_chart StackLab

Database Migration

19 steps · pending Not started · person_outline Guest
arrow_back Back

Add sample borrowing records

Now we can connect our students to books. Add:

code sql
INSERT INTO borrow (
    student_id,
    book_id
) VALUES
    (1, 2),
    (2, 1),
    (3, 3);
Because the IDs come from our earlier data, these records mean:
code text
CLIFF AMADEUS → Jurassic Park
JAN XAVIER    → Project Hail Mary
RON EDMUND    → 1984
Notice that we only supplied student_id and book_id. MySQL automatically supplies:
code text
borrow_id
borrow_date
And borrow_return_date remains NULL. That means all three books are currently considered borrowed.

login Sign in to save your progress permanently. info Progress is saved in your browser session
format_list_numbered Step 10 of 19