Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Fall 2023 - CS403 - 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Virtual University of Pakistan SEMESTER Fall 2023

CS403 –Database Management Systems


Assignment No.2 (Graded)

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.

● Cheating from any source will result in zero marks in


the assignment.
● The submitted assignment does NOT open or the file is corrupted.
● No assignment after the due date will be accepted
● Students can submit HTML, Images & Plain text only in this inline Mode. You
may also insert an image file/table.
● DOC/pdf File uploading option will not be available) in inline assignment
submission.

Uploading Assignment Instruction


Follow the given instructions to submit inline assignments.
● Students can insert the images of the following formats.

● Images and tables can be inserted using the following highlighted option in the
interface.
Virtual University of Pakistan SEMESTER Fall 2023

Objectives and Learning Outcomes:


The objectives of this assignment are to:
 Implement Relational Algebra.
 Implement different types of Joins.

The Learning Outcome of this assignment is that,

 Students will be able to implement different types of Joins using relational algebra.

For any query about the assignment, contact at cs403@vu.edu.pk.

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:

 SQL code for join operations is not required.

Submission Guidelines:
You can insert tables in inline assignment Interface as highlighted in screenshot given in
“Uploaded Assignment Instruction” Section.

Labs Covered: This assignment covers Lectures # 17 - 18.

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.

For any query about the assignment, contact at email CS403@vu.edu.pk

You might also like