0% found this document useful (0 votes)
20 views

Assignment 5

The document describes a database schema with relations for tracking student course enrollment and book adoption. It includes the relations, foreign keys, sample data insertion, and example queries to retrieve distinct models and serial numbers with prices over 30,000.

Uploaded by

Anas Souissi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Assignment 5

The document describes a database schema with relations for tracking student course enrollment and book adoption. It includes the relations, foreign keys, sample data insertion, and example queries to retrieve distinct models and serial numbers with prices over 30,000.

Uploaded by

Anas Souissi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Faculty of Engineering

Fall Semester
and Technology
2022-2023
Database Systems (1)
Assignment (5) COM 232

1. Consider the following relations for a database that keeps track of student enrollment in
courses and the books adopted for each course:

CAR (Serial_no, Model, Manufacturer, Price)


OPTION (Serial_no, Option_name, Price)
SALE (Salesperson_id, Serial_no, Date, Sale_price)
SALESPERSON (Salesperson_id, Name, Phone)

a) Specify the foreign keys for this schema, stating any assumptions you make.
b) Next, populate the relations with a few sample tuples, and then give an example of
an insertion in the CAR, OPTION, SALE, and SALESPERSON relations (using
SQL queries).
c) Retrieve distinct “Model” from “CAR” table.
d) Retrieve “Serial_no” and “Model” from “CAR” table when Price more than 30,000.

Good Luck
Page 1 of 1

You might also like