Normalize ShopDB to 3NF#165
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your normalization approach is conceptually correct—splitting ProductInventory into Products, Warehouses, and a junction table is the right 3NF strategy. However, critical execution errors prevent the script from running. The main issues are: (1) Duplicate CREATE TABLE statements for Countries and ProductInventory will cause immediate "Table already exists" errors—remove the first definition of each table and keep only one. (2) INSERT statements reference non-existent columns—lines 53-60 still use old columns like ProductName, WarehouseName, WarehouseAmount that no longer exist in the new normalized structure. (3) Missing INSERTs for the new Products and Warehouses tables—you'll need separate INSERT statements for each. Fix the duplicate definitions first, then rewrite the INSERT statements to match the new table schemas with proper foreign key references.
✨ 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.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: NCM]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: NCM]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: NCM]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: NCM]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
Losiev
left a comment
There was a problem hiding this comment.
GitHub tests should pass
Run docker exec mysql sh -c 'mysql -u root -pP@ssw0rd < /scripts/task.sql'
Warning: arning] Using a password on the command line interface can be insecure.
ERROR 1050 (42S01) at line 24: Table 'Countries' already exists
Error: Process completed with exit code 1.
|
I don't quite understand why the tests aren't passing |
linubah
left a comment
There was a problem hiding this comment.
Error in cheks is clear: Table 'Countries' already exists
you creating table two times in sql cript and the task is to update tables it to the third normal form
No description provided.