Skip to content

Solution#108

Open
serhii-kermas wants to merge 2 commits into
mate-academy:mainfrom
serhii-kermas:develop
Open

Solution#108
serhii-kermas wants to merge 2 commits into
mate-academy:mainfrom
serhii-kermas:develop

Conversation

@serhii-kermas

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

Thank you for your hard work on normalizing the ShopDB database! Before your solution can be approved, please address these critical issues: (1) The order of columns in the INSERT statements for the Addresses table does not match the table definition—please ensure the values are in the correct order; (2) The Warehouses table's INSERT statements are missing values for the WarehouseAddress column, which will cause errors. Once you fix these, your script should work as expected. Keep going, 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

Comment thread task.sql Outdated
Comment on lines +46 to +47
INSERT INTO Addresses (ID,Street,City,CountryID)
VALUES (1, 'City-1', 'Street-1', 1);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Issue: The order of values in the INSERT statement does not match the column order in the Addresses table definition. It should be (ID, Street, City, CountryID) but you have ('City-1', 'Street-1', 1). Please correct the order of values.

Comment thread task.sql Outdated
Comment on lines +48 to +49
INSERT INTO Addresses (ID,Street,City,CountryID)
VALUES (2, 'City-2', 'Street-2', 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.

Issue: The order of values in the INSERT statement does not match the column order in the Addresses table definition. It should be (ID, Street, City, CountryID) but you have ('City-2', 'Street-2', 2). Please correct the order of values.

Comment thread task.sql
Comment on lines +51 to +52
INSERT INTO Warehouses (ID,WarehouseName,WarehouseAmount)
VALUES (1, 'Warehouse-1', 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.

Error: The Warehouses table definition includes a WarehouseAddress column, but the INSERT statement does not provide a value for it. You need to include a value for WarehouseAddress in the INSERT statement.

Comment thread task.sql
Comment on lines +53 to +54
INSERT INTO Warehouses (ID,WarehouseName,WarehouseAmount)
VALUES (2, 'Warehouse-2', 5);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Error: The Warehouses table definition includes a WarehouseAddress column, but the INSERT statement does not provide a value for it. You need to include a value for WarehouseAddress in the INSERT statement.

@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

Fantastic work! 🎉 Your updated task.sql fully meets all the requirements for 3NF normalization. The schema is well-structured, all test data is preserved, and previous issues have been resolved. Keep up the great work!


✨ 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
Comment on lines +21 to +26
CREATE TABLE Warehouses(
ID INT,
WarehouseName VARCHAR(50),
WarehouseAmount INT,
PRIMARY KEY (ID)
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Potential issue: The Warehouses table does not include a WarehouseAddress column. If the task requires each warehouse to have an address (as suggested by the checklist or requirements), you should add a WarehouseAddress (or AddressID) column and update the INSERT statements accordingly.

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