Skip to content

tables updated to third normalization form#110

Open
TymurProkhorov wants to merge 3 commits into
mate-academy:mainfrom
TymurProkhorov:updating-to-3-norm-form
Open

tables updated to third normalization form#110
TymurProkhorov wants to merge 3 commits into
mate-academy:mainfrom
TymurProkhorov:updating-to-3-norm-form

Conversation

@TymurProkhorov

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

REQUEST_CHANGES

Your SQL script is very well-structured and shows a strong understanding of database normalization and MySQL syntax. However, there is one critical requirement missing that must be addressed before approval:

  • Missing DROP DATABASE IF EXISTS ShopDB; Statement
    • The task requires that you start your script by dropping the ShopDB database if it already exists. This ensures a clean setup every time the script is run. Currently, your script begins with CREATE DATABASE ShopDB; but does not include the required DROP DATABASE IF EXISTS ShopDB; statement. This omission could cause errors if the database already exists, and it violates an explicit checklist item.
    • How to fix: Add the following line as the very first statement in your script:
      DROP DATABASE IF EXISTS ShopDB;

Minor suggestion:

  • In your Countries table, you have both ID INT PRIMARY KEY AUTO_INCREMENT, and an explicit PRIMARY KEY (ID). Only one is needed, but this is not a blocker—just a style improvement for clarity.

Once you add the DROP DATABASE IF EXISTS ShopDB; line, your submission will fully meet the requirements. Great work on the normalization and overall structure! Let me know if you have any questions.


✨ 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

All core requirements are fully met, and the script is functionally correct. The schema is normalized to 3NF, all necessary tables and relationships are present, and the SQL syntax is valid for MySQL. The minor style suggestion about the primary key definition in the Countries table does not affect functionality or cause errors. Great job on implementing the feedback and producing a robust, well-organized solution!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

Comment thread task.sql
CREATE TABLE Countries (
ID INT,
ID INT PRIMARY KEY AUTO_INCREMENT,
Name VARCHAR(50),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There is a trailing comma after the last column definition in the Countries table. In MySQL, this will cause a syntax error. Remove the comma after Name VARCHAR(50) to ensure the table is created successfully.

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