Skip to content

Restructered DataBase to 2,3 NormalizationForm, Remade Inserts, Imple…#167

Open
Clem97121 wants to merge 3 commits into
mate-academy:mainfrom
Clem97121:develop/database-normalization
Open

Restructered DataBase to 2,3 NormalizationForm, Remade Inserts, Imple…#167
Clem97121 wants to merge 3 commits into
mate-academy:mainfrom
Clem97121:develop/database-normalization

Conversation

@Clem97121
Copy link
Copy Markdown

…mented a many-to-many relationship by adding a ProductWarehouse table, which is causing the tests to fail

…mented a many-to-many relationship by adding a ProductWarehouse table, which is causing the tests to fail
Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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! ✨

Footnotes

  1. Rate AI review example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants