Skip to content

Done#191

Open
1ntact wants to merge 3 commits into
mate-academy:mainfrom
1ntact:main
Open

Done#191
1ntact wants to merge 3 commits into
mate-academy:mainfrom
1ntact:main

Conversation

@1ntact

@1ntact 1ntact commented Jun 23, 2026

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 some core requirements of the task are not yet met and tests are failing as a result. You correctly switched to USE ShopDB; and created indexes on Customers.Email and Orders.CustomerID, but the index names do not follow the explicit rule that the index name must exactly match the column name (e.g., the index on Email must be named Email, and the one on CustomerID must be named CustomerID). In addition, the usage scenario clearly requires an index on Products.Name for frequent name-based product searches, and this index is currently missing, causing the “Index for Product.Name was not found” test failure. You also haven’t added any indexes for OrderItems, even though frequent order creation and lookups typically require indexes on relationship columns like OrderItems.OrderID and OrderItems.ProductID; you should decide which of these are used in joins/lookups and index them, naming each index exactly like its column.

To fix this, update task.sql to: 1) rename your existing indexes so each CREATE INDEX uses the column name as the index name; 2) add an index on Products(Name) named Name; and 3) add appropriate indexes on OrderItems (for example, on OrderID and/or ProductID), again using the column names as the index names. After making these changes, ensure task.sql runs cleanly against a fresh ShopDB created from create-database.sql and passes all checks in test.sql. You’re close—once you align the index coverage and naming with the requirements, this solution should pass.


✨ 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
USE ShopDB;
USE ShopDB;

CREATE INDEX index_emails ON Customers (Email);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

According to the task, index names must match their column names exactly. For this index on Email, rename it so the index name is Email, not index_emails. Also consider whether other columns (e.g., Products.Name) need indexes based on the usage scenarios and add them here.

Comment thread task.sql Outdated
USE ShopDB;

CREATE INDEX index_emails ON Customers (Email);
CREATE INDEX index_customer_id ON Orders (CustomerID); No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same naming issue here: the index on CustomerID should be named CustomerID rather than index_customer_id. Additionally, you currently don’t define any indexes for Products or OrderItems, which may be required based on the described query patterns (search by product name, frequent order and order item access).

@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 functional and checklist requirements. You correctly switch to the ShopDB database with USE ShopDB;, and all required indexes are created on the appropriate columns: Customers(Email), Orders(CustomerID), Products(Name), and OrderItems(OrderID) plus OrderItems(ProductID). Each index is named exactly the same as its corresponding column (for example, index Email on Customers(Email)), which aligns with the explicit naming requirement. The script is valid SQL and should run cleanly against a fresh ShopDB created by the provided create-database.sql, with no missing functionality or broken behavior for the described usage scenarios. Overall, your indexing choices match the login, product search, and order lookup patterns described in the task, so this implementation is accepted as complete and correct.


✨ 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