Skip to content

done#149

Open
yeromin wants to merge 2 commits intomate-academy:mainfrom
yeromin:dev
Open

done#149
yeromin wants to merge 2 commits intomate-academy:mainfrom
yeromin:dev

Conversation

@yeromin
Copy link
Copy Markdown

@yeromin yeromin commented Feb 7, 2026

No description provided.

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Review Summary

You've made a great start by correctly adding indexes for product searches and customer logins. The SQL syntax is perfect.

However, this requires changes because the analysis of the shop's usage scenarios is incomplete. A key feature of any online shop is allowing customers to view their order history. To make this efficient, you also need to add indexes on the foreign key columns used to connect orders to customers and products.

Please add the following indexes to your task.sql file:

  • Orders(CustomerID)
  • OrderItems(OrderID)
  • OrderItems(ProductID)

Indexing these columns is crucial for the performance of queries that retrieve order information, which is a core requirement for this system.


✨ 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 on lines +4 to +5
CREATE INDEX Name ON Products (Name);
CREATE INDEX Email 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.

Your analysis correctly identified the need for indexes on Products(Name) and Customers(Email) based on the login and search scenarios. That's a great start!

However, a complete analysis should also consider how data is retrieved. In an online shop, users frequently view their order history. To make these queries efficient, you should also add indexes on the foreign key columns:

  • Orders(CustomerID)
  • OrderItems(OrderID)
  • OrderItems(ProductID)

Think about the queries needed to show a customer their past orders and the items in each order. Indexing these foreign key columns is a standard practice that significantly improves performance.

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Review Summary

Excellent work on this submission! I am approving your solution. You've successfully addressed all the previous feedback by creating the necessary indexes for handling order history lookups. Your analysis of the usage scenarios is now complete and correct, covering all key areas like product searches and customer order retrieval. The SQL in task.sql is well-written and follows all the required conventions. Great job completing this task!


✨ 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