Normalize database#149
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
You have done an excellent job normalizing the database schema to the third normal form. However, the task requires the script to populate the new tables with test data, and this part is currently not working because all the INSERT statements in task.sql are commented out. This is a critical requirement for completing the task. Please uncomment the INSERT statements for the Countries, Warehouses, Products, and ProductInventory tables to make the script fully executable. After that small fix, your solution will be ready for approval!
✨ 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
| --INSERT INTO Countries (ID,Name) | ||
| -- VALUES (1, 'Country1'); | ||
| --INSERT INTO Countries (ID,Name) | ||
| -- VALUES (2, 'Country2'); | ||
| -- | ||
| --INSERT INTO Warehouses (ID, WarehouseName, WarehouseAddress) | ||
| -- VALUES (1, 'Warehouse-1', 'City-1, Street-1'); | ||
| --INSERT INTO Warehouses (ID, WarehouseName, WarehouseAddress) | ||
| -- VALUES (2, 'Warehouse-2', 'City-2, Street-2'); | ||
| -- | ||
| --INSERT INTO Products (ID, ProductName, CountryID) | ||
| -- VALUES (1, 'AwesomeProduct', 1); | ||
| --INSERT INTO Products (ID, ProductName, CountryID) | ||
| -- VALUES (2, 'AwesomeProduct', 2); | ||
| -- | ||
| --INSERT INTO ProductInventory (ID, ProductID, WarehouseAmount, WarehouseID) | ||
| -- VALUES (1, 1, 2, 1); | ||
| --INSERT INTO ProductInventory (ID, ProductID, WarehouseAmount, WarehouseID) | ||
| -- VALUES (2, 2, 5, 2); |
There was a problem hiding this comment.
You've correctly defined the normalized database schema. However, the task requires you to provide updated INSERT statements to populate the new tables with test data. All the INSERT statements from this point to the end of the file are commented out. Please uncomment them so the script can be executed to populate the database.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great job on normalizing the database schema to the third normal form and updating the INSERT statements! Your solution is very close to complete.
However, there is one critical requirement missing. The script must be re-runnable, which means it needs to handle the case where the ShopDB database already exists. Currently, the script will fail if you try to run it a second time.
To fix this, please add the following command at the beginning of your task.sql file:
DROP DATABASE IF EXISTS ShopDB;Once you add this line, your solution will meet all the requirements. You're almost there!
✨ 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
Excellent work on this submission! I'm happy to approve your solution. You've successfully addressed all the feedback from the previous review by making the script re-runnable. The database schema is now perfectly normalized to the third normal form, and your INSERT statements are correctly aligned with the new structure. You've met all the project requirements. Fantastic job!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
No description provided.