Restructered DataBase to 2,3 NormalizationForm, Remade Inserts, Imple…#167
Restructered DataBase to 2,3 NormalizationForm, Remade Inserts, Imple…#167Clem97121 wants to merge 3 commits into
Conversation
…mented a many-to-many relationship by adding a ProductWarehouse table, which is causing the tests to fail
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your normalization to 3NF is conceptually correct, but the test suite at line 30 of test.sql explicitly requires a ProductInventory table to exist in ShopDB. The test fails with error 1146 (42S02) because this table is missing from your implementation. While you've properly decomposed the data into Products, Warehouses, and a junction table, you need to include the ProductInventory table itself—the tests expect it to exist as part of the schema, even in a normalized form. Add the ProductInventory table back to your task.sql to satisfy the test requirements.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your solution is approved. The normalized schema correctly implements 3NF by decomposing the data into four tables (Countries, Product, Warehouses, ProductInventory) with appropriate foreign key relationships. The critical issue from the previous review—missing ProductInventory table—has been resolved, and the junction table now properly handles the many-to-many relationship between products and warehouses with the amount attribute. All INSERT statements maintain referential integrity across the schema. The implementation satisfies all stated requirements and should pass the test suite.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
…mented a many-to-many relationship by adding a ProductWarehouse table, which is causing the tests to fail