Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions task.sql
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# Write your SQL code for the database creation here. Good luck!
USE ShopDB;
USE ShopDB;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good to use the correct database with USE ShopDB; — ensure you ran the create-database.sql script beforehand so this database exists before running these statements.


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.

You created an index on Customers(Email), which is appropriate for login-by-email queries. The task also expects indexes on other tables/columns inferred from the usage scenario — those are currently missing.


CREATE INDEX Name ON Products(Name);

CREATE INDEX CustomerID ON Orders(CustomerID);

CREATE INDEX OrderID ON OrderItems(OrderID);

CREATE INDEX ProductID ON OrderItems(ProductID);
Loading