Fall 2023 - CS403 - 2
Fall 2023 - CS403 - 2
Fall 2023 - CS403 - 2
Maximum Marks: 20
Instructions Due Date: 12th Jan 2024
The purpose of this assignment is to give you hands-on practice. It is expected that students
will solve the assignment themselves. The following rules will apply during the evaluation
of the assignment.
● Images and tables can be inserted using the following highlighted option in the
interface.
Virtual University of Pakistan SEMESTER Fall 2023
Students will be able to implement different types of Joins using relational algebra.
Scenario:
Assume that you are working as a database administrator for a company named XYZ. XYZ is a
prominent vehicle spare parts manufacturing company known for producing a wide range of
spare parts, including Headlights, Bumper , Seats, Tires, Engines, and Breaks for popular car
brands such as Toyota, Honda, Suzuki, MITSUBISHI and Nissan. Some of the spare parts such
as engines, headlights and engines are delivered in pieces (PCs) while seats, tires and breaks
are delivered in sets. As part of your role, you are responsible for managing the company's
database to ensure optimal performance and facilitate seamless operations. Review and
understand the existing data schema of the spare parts database and perform join operation on
the following spare parts.
The Following are the two tables named COMPANY & ITEM.
COMPANY
Comp_ID Comp_Name Comp_City Comp_Ph#
C001 Toyota Islamabad 051-321002
C002 Honda Lahore 042-321002
C003 Suzuki Peshawar 091-321002
C004 MITSUBISHI Quetta 081-321002
C005 Nissan Gilgit 092-321002
ITEM
Item_ID Item_Name Item_Unit Item_Quantity CID
1 Lights PCs 50 C001
2 Bumper PCs 20 C002
3 Seats Set 10 C003
4 Tires Set 60
5 Engine PCs 5
6 Breaks Set 14 C005
Virtual University of Pakistan SEMESTER Fall 2023
Question Statement:
Students are required to apply the following Join Operations in the form of relational algebra
on given tables “COMPANY and ITEM” and provide resultant tables.
i. Theta Join on Company and Item tables having a condition Item_Unit = PCs
ii. Equi join on Company and Item tables.
iii. Natural join on Company and Item tables.
iv. Semi join on Company and Item tables
Dos:
Understand Relational Algebra Operations and perform joins.
In solution, provide only relational algebra expression and resultant table for each type
of join.
Donts:
Submission Guidelines:
You can insert tables in inline assignment Interface as highlighted in screenshot given in
“Uploaded Assignment Instruction” Section.
Note: Plagiarism will be checked for each question. Please answer the
questions in your own words and marks will be awarded based on your
answer and plagiarism report.