You are on page 1of 7

ShaheedZulfikar Ali Bhutto Institute of Science & Technology

COMPUTER SCIENCE DEPARTMENT

Total Marks: 05

Obtained Marks:

Database Systems
Assignment # 03
Last date of Submission: 10th January , 2021

Submitted To: ______________________________________________________________________________________________________________________________________________________________________________________________________________________________________

Student Name: _______________________________________________________________________________________________________________________________________________________________________________________________________________________________________

Reg Number: _______________________________________________________________________________________________________________________________________________________________________________________________________________________________________

Database Systems BS(CS)-4 SZABIST-ISB


ShaheedZulfikar Ali Bhutto Institute of Science & Technology

COMPUTER SCIENCE DEPARTMENT

Instructions:
 Copied or shown assignments will be marked zero.
 Late submissions will result in marks deduction.
 Hand written assignments are not acceptable.
 If you have any questions, you can e-mail it on mailto:aunsia.khan@szabist-isb.edu.pk

Q1: Implement the following clauses on a database of your choice and produce results. (Write
query and add screen shot of your implementation)

Tables;

City:

Student:

Database Systems BS(CS)-4 SZABIST-ISB


ShaheedZulfikar Ali Bhutto Institute of Science & Technology

COMPUTER SCIENCE DEPARTMENT

i) Join

ii) IN

iii) Between

Database Systems BS(CS)-4 SZABIST-ISB


ShaheedZulfikar Ali Bhutto Institute of Science & Technology

COMPUTER SCIENCE DEPARTMENT

iv) View

v) Group By

vi) Order By

Database Systems BS(CS)-4 SZABIST-ISB


ShaheedZulfikar Ali Bhutto Institute of Science & Technology

COMPUTER SCIENCE DEPARTMENT

vii) Like

Q2: Given the following relation tables, write SQL queries for each user response?

i) List all products between $10 and $20

ii) Update the city to Sydney for supplier Pavlova, Ltd. 

Database Systems BS(CS)-4 SZABIST-ISB


ShaheedZulfikar Ali Bhutto Institute of Science & Technology

COMPUTER SCIENCE DEPARTMENT


iii) List all orders from January 2015 to June 2016 with customer information 

iv) List all products that start with 'Cha' or 'Chan' and have one more character.

v) List all customers that are from the same countries as the suppliers.

Database Systems BS(CS)-4 SZABIST-ISB


ShaheedZulfikar Ali Bhutto Institute of Science & Technology

COMPUTER SCIENCE DEPARTMENT

Database Systems BS(CS)-4 SZABIST-ISB

You might also like