Yana P.#2
Conversation
composix
left a comment
There was a problem hiding this comment.
Nice work that is not only technically correct, but also done with care and a good eye for detail. The schema is well structured, the table relationships are clear, and the use of keys, constraints, and indexes shows a strong understanding of database design.
There was a problem hiding this comment.
Bonus points for this docker compose file. It helps a lot to be able to validate the work in this PR.
|
|
||
|
|
||
|
|
||
| - |
There was a problem hiding this comment.
This - makes that some tables are missing after running this script due to a syntax error. Deleting the - fixed the problem, so not really a big deal. Running it second time was a bit of a challenge using CREATE TABLE IF NOT EXISTS to make the script a bit more idempotent.
| card_number TEXT UNIQUE NOT NULL, | ||
| card_issued_on DATE NOT NULL, | ||
| card_expires_on DATE NOT NULL, | ||
| CHECK (card_expires_on > card_issued_on) |
| member_address TEXT NOT NULL, | ||
| CONSTRAINT fk_card_id | ||
| FOREIGN KEY (card_id) | ||
| REFERENCES cards (card_id) ON DELETE CASCADE |
There was a problem hiding this comment.
Should members whose card is deleted be deleted as well? Or is using ON DELETE SET NULL also an option?
There was a problem hiding this comment.
Using a .gitignore file with a line "target/" could be helpful to prevent build output to end up under version control.
Implemented Task 1 and Task 2 for the Library Management System module.
Task 1
Task 2