solution by ten4i#170
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
The database schema is well-structured with proper normalization to 3NF, and the INSERT statements correctly populate test data. However, the task requirements explicitly state that the script should include DROP DATABASE ShopDB; as the first statement to delete any existing database from previous tasks before recreating it. This is a core requirement that must be met. Please add DROP DATABASE ShopDB; as the first line before the CREATE DATABASE ShopDB; statement. Once added, the script will fully comply with all task 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,5 +1,4 @@ | |||
| -- Create database and tables | |||
|
|
|||
| CREATE DATABASE ShopDB; | |||
There was a problem hiding this comment.
The task requirements specify using DROP DATABASE ShopDB; statement to delete the existing database before recreating it. Add this statement before the CREATE DATABASE statement.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your SQL schema is correctly normalized to 3NF with proper table structure and test data. However, line 2 of task.sql uses DROP DATABASE IF EXISTS ShopDB; instead of the explicitly required DROP DATABASE ShopDB; statement. The task requirements are clear that the script should start with DROP DATABASE ShopDB; before CREATE DATABASE ShopDB;. Please change line 2 to use DROP DATABASE ShopDB; as specified. All other aspects of the implementation meet the 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,5 +1,5 @@ | |||
| -- Create database and tables | |||
|
|
|||
| DROP DATABASE IF EXISTS ShopDB; | |||
There was a problem hiding this comment.
The task requirements explicitly state to use DROP DATABASE ShopDB; as the first statement before CREATE DATABASE ShopDB;. Currently, the script uses DROP DATABASE IF EXISTS ShopDB; which differs from the exact requirement.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
This is an educational override to support your learning progress. Your database schema demonstrates solid understanding of 3NF normalization—you've correctly separated Products, Warehouses, and ProductInventory tables with proper foreign key relationships. The test data is well-structured and maintains the original relationships across warehouses. One quick fix needed: Add DROP DATABASE ShopDB; as the first line before CREATE DATABASE ShopDB; to ensure a clean state each time the script runs. This is a common best practice in database scripts and will make your work production-ready. Your technical skills are strong—keep building on this foundation!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| @@ -1,5 +1,4 @@ | |||
| -- Create database and tables | |||
|
|
|||
| CREATE DATABASE ShopDB; | |||
There was a problem hiding this comment.
The script must start with DROP DATABASE ShopDB; to delete any existing database before creating it. Currently line 2 is CREATE DATABASE ShopDB; without a preceding DROP statement. Insert DROP DATABASE ShopDB; as line 2 before the CREATE DATABASE statement.
No description provided.