Académique Documents
Professionnel Documents
Culture Documents
03
SEMESTER Fall 2019 Total Marks: 20
1. Convert the above relational data model into a physical database. For which you have to first create a
database. So, write a SQL statement which creates a database. The database name should be as your
student id. For example, if your student id is BC123456789, then the database name should also be
BC123456789.
*If database name is different from your student id, then your assignment will be graded as zero.
2. After the database creation, you are required to write the SQL queries in order to create all tables in the
database. You also have to apply different constraints like primary key constraint and foreign key
constraints where applicable.
3. After creation of all tables, you are required to add the following records into the Order, Customer and
Bill tables by writing the appropriate SQL Queries.
Order Table:
Bill Table:
Bill_ID Order_ID date Amount
5. Finally retrive the “Completed Orders” in a inner joined table such as:
Order_ID as OID from order table
Order_Status as Status from order table
Delivery_Date as Date from order table
Customer_name as Name from customer table
Amount as Bill Amount from Bill table