Code Lab is in development. New lessons and improvements are on the way. Progress can be deleted.
Loading…
Code Lab is in development. New lessons and improvements are on the way. Progress can be deleted.
Loading…
Code Lab is in development. New lessons and improvements are on the way. Progress can be deleted.
SQL / POSTGRESQL / Learn / LESSON 08
CHECK and FOREIGN KEY reject invalid INSERT/UPDATE. Create members and loans with an FK; insert a valid loan. An invalid member_id must fail (asserted in tests).
Small example:
CREATE TABLE members (...);
CREATE TABLE loans (... REFERENCES members ...);
INSERT INTO members ...; INSERT INTO loans ...;The database starts empty. Grading checks the schema/data you create across variants.
Expected verify columns: table_name, constraint_type, constraint_type, name, book_title, days · row order is checked
Expected final state (displayed data):
Loading…CHECK and FOREIGN KEY reject invalid INSERT/UPDATE. Create members and loans with an FK; insert a valid loan. An invalid member_id must fail (asserted in tests).
QUERY STANDBY
›