Skip to content

Normalize database#149

Open
kkryzhanivska wants to merge 3 commits into
mate-academy:mainfrom
kkryzhanivska:solution
Open

Normalize database#149
kkryzhanivska wants to merge 3 commits into
mate-academy:mainfrom
kkryzhanivska:solution

Conversation

@kkryzhanivska

Copy link
Copy Markdown

No description provided.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread task.sql Outdated
Comment on lines +39 to +57
--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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

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.

3 participants