- Create database named " store ".
- Create table countries.
- Create table users.
- Create table orders.
- Create table order_products.
- Create table products.
-
countries
- Add unique constraint to column " name ".
- Add not null constraint to column " continent_name ".
-
users
- Add unique constraint to column " email ".
- Add check constraint to column " gender " between 'm' or 'f'.
-
orders
- Add check constraint to column " status " between 'start' or 'finish'.
-
order_items
- Add default value to column " quantity " value 0.
-
products
- Add default value to column " price " value 0.
- Add not null constraint to column " name ".
- Add check constraint to column " status " between 'valid' or 'expired'.
Bouns : Add default datetime to created_at column which take the timestap when the row is created
-
Add new row to the countries table.
-
Add new row to the users table.
-
Add new row to the orders table.
-
Add new row to the products table.
-
Add new row to the order_products table.
-
Update row from countries table.
-
Delete row from products table.
- Create new Github repository .
- Create new file in the repositry.
- In the file write all the commands ( DML & DDL ) which you used to complete the above tasks.
- Commit the new file.
- Send your repo's link to your "مشرف"
# | Criteria | Percentage % |
---|---|---|
1 | Create tables and database as required | 20 |
2 | Connect tables as required | 20 |
3 | Add constraints to the tables column as required | 20 |
4 | Execute all the DML commands | 20 |
Total | 100 |