diff --git a/create-database.sql b/create-database.sql index ecd693a..94297dc 100644 --- a/create-database.sql +++ b/create-database.sql @@ -1,4 +1,4 @@ -CREATE DATABASE ShopDB; +CREATE DATABASE IF NOT EXISTS ShopDB; USE ShopDB; CREATE TABLE Products ( diff --git a/task.sql b/task.sql index 0c5b574..040cbed 100644 --- a/task.sql +++ b/task.sql @@ -1,2 +1,8 @@ # Write your SQL code for the database creation here. Good luck! -USE ShopDB; +USE ShopDB; + +CREATE INDEX product_name_idx ON Products (Name); + +CREATE INDEX customer_email_idx ON Customers (Email); + +CREATE INDEX order_customerid_idx ON Orders (CustomerID);