Sunday, 05 20th

Last update09:44:47 AM

Login With Facebook

Combinestudy

Fifth Assignment Spring 2011 CS403 5

Assignment No. 05
Semester Spring2011
Database Management Systems-CS403

Total Marks: 15

Due Date: 06/07/2011

Objective:

To learn and understand basic concepts of “creation and updating” of views. 

Instructions:

Please read the following instructions carefully before solving & submitting assignment:

It should be clear that your assignment will not get any credit (marks) if:

  1. The assignment is submitted after due date.
  2. The submitted assignment does not open or file corrupt.
  3. The submitted assignment is in the format other than MS Word (doc).
  4. The assignment is copied (from other student or copy from handouts).
  5. Student ID is not mentioned in the assignment File or name of file is other than student ID.

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

GOOD LUCK 

Q 1: Write SQL statements/queries for each of individual scenario given below from the given tables on the next page. 15 marks (3+4+4+4)

  1. Create a view to show all the supplier names along with their Supplier IDs
  2. Create a view to show the supplier name and supplier ID, who provide the product “Mirrors”.
  3. Create a view to list down all the product names with their category names.
  4. Update view to change the Supplier name from “AB Hardwares” to “Uplink Hardwares”.

 “You will have to give the reason, If the query for any of above statement cannot execute”

Product

Product ID

Product Name

Category ID

PID-1

Bumper Cover

CT-1

PID-2

Bumper

CT-1

PID-3

Fender

CT-2

PID-4

Mirrors

CT-3

PID-5

Hood

CT-4

 Category

Category ID

Category Name

Supplier ID

CT-1

Bumper & Components

SP-1

CT-2

Fenders & Components

SP-2

CT-3

Mirrors & Components

SP-2

CT-4

Hoods & Components

SP-3

 Supplier

Supplier ID

Supplier Name

SP-1

S & S corporations

SP-2

AB Hardwares

SP-3

CG Brothers

 Guidelines / Instructions

  • Understand the scenario on the basis of given data only.
  • Write only SQL statements, don’t show any data.

“Try to upload the assignment before BONUS day”

Upload your Solution