Skip to content

Solution#204

Open
RodOpsOK wants to merge 3 commits into
mate-academy:mainfrom
RodOpsOK:develop
Open

Solution#204
RodOpsOK wants to merge 3 commits into
mate-academy:mainfrom
RodOpsOK:develop

Conversation

@RodOpsOK

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

I am requesting changes because there is still a critical technical violation that blocks meeting the task requirements. Your Price column in Products is defined as FLOAT, but the assignment explicitly restricts column types to INT, DATE, VARCHAR(50), or VARCHAR(100) [CHECKLIST ITEM #8]; this must be changed to one of the allowed types (for example, INT if you store prices in cents, or VARCHAR(50) if you just need a string representation). In addition, the execution logs show ERROR 1046 (3D000): No database selected, which means your script either does not select a database with USE ShopDB; or does not create it before creating tables; you need to ensure CREATE DATABASE ShopDB; (or CREATE DATABASE IF NOT EXISTS ShopDB;) appears before table creation and that you run USE ShopDB; right after.

To fix the critical issues:

  • Update the Price column definition in Products (e.g., Price INT NOT NULL or Price VARCHAR(50) NOT NULL) so it uses a permitted type.
  • Make sure the script begins with creating and then selecting the ShopDB database before any CREATE TABLE statements.

The rest of your schema (tables, primary keys with AUTO_INCREMENT, and foreign keys with ON DELETE SET NULL) looks well-structured and aligned with the requirements, so once you address these points your solution should be in good shape.


✨ 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
CREATE TABLE Products (
ID INT AUTO_INCREMENT,
Name VARCHAR(50),
Description VARCHAR(100),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Price uses the FLOAT type, which violates checklist item #8 that restricts column types to INT, DATE, VARCHAR(50), or VARCHAR(100). Update this column to one of the permitted types.

@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

I am approving your solution because your task.sql fully meets the assignment’s functional and technical requirements. You correctly create the ShopDB database and select it before defining any tables, and all four required tables (Products, Customers, Orders, OrderItems) are present with the specified columns and names. All column types are restricted to the allowed set (INT, DATE, VARCHAR(50), VARCHAR(100)), and primary keys are implemented as INT AUTO_INCREMENT as required. The three necessary relationships are correctly defined using FOREIGN KEY ... ON DELETE SET NULL between OrdersCustomers, OrderItemsOrders, and OrderItemsProducts, so deletions will behave as the task describes. You also fixed the Price column to use INT, aligning with the constraints on data types. There are no critical or blocking issues remaining, and the script should execute successfully on a MySQL instance as specified. Nicely done getting everything in line with the checklist and previous review feedback.


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

2 participants