Assignment 1

You might also like

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

“Teachers have such powers that prime ministers can only about”

~Plato

MODULE-Database System II
Assignment Name & Number :- Advanced database concepts- Assignment1
Assignment type :-Written-Individual
Duration :-2 hours
Submission Method :-Soft Copy/ hard Copy

1. What is the purpose of the PL/SQL language? (Marks: 10)


2. There are two sets of commands or syntax which can be used to make connections
between tables in a database. Explain them. (Marks: 5x2=10)
3. Explain types of joins using examples? (Marks: 10)
4. What is the difference between an inner and outer join? (Marks: 10)
5. Explain the difference between DELETE, TRUNCATE and DROP commands and give
examples? (Marks: 10)
6. Here’s a sample problem based on the following tables:

Table: Salesperson
Sales_ID Name Salary Commission Hire Date
1 John 100000 6 4/1/2006
2 Amy 120000 5 5/1/2010
3 Mark 65000 12 12/25/2008
4 Pam 25000 25 1/1/2005
5 Alex 50000 10 2/3/2007

Table: Customer
Cust_ID Name City
1 Red Bostan
2 Orange New York
3 Yellow Bostan
4 Green Austrin

Table: Order
Order_ID Cust_ID Sales_Id Amount
1 3 4 100000
2 4 5 5000
3 1 1 50000
4 1 4 25000

Diploma in Information Communication Technology (NVQ Level –V)


“Teachers have such powers that prime ministers can only about”
~Plato

Sample questions based on the above tables:


a) Given the tables above, write a query that will calculate the total commission by
salesperson.
b) Name all salespersons who did not sell to company Red.
c) Concatenate the fields Sales_ID in Salesperson with Amount in Order.
d) Extract all the records Cust_ID, Name in Customer table, Order_ID,
Sales_Id, Amount in Order table.
e) Calculate the grand total of Salary all the Salespersons and displays as
“Tatal Salary”.
(Marks: 2x5=10)

7. Answer the under mentioned questions using following tables.

a) Find all products under price 200 manufactured in Japan?


b) Extract all the records with all fields of both tables which Category in Gadgets
or Household. (Marks: 5x2=10)
8. Explain the purpose of use the Null, BETWEEN, IN and LIKE?
(Marks: 2.5x4=10)

Diploma in Information Communication Technology (NVQ Level –V)


“Teachers have such powers that prime ministers can only about”
~Plato

9. What is the difference between a HAVING CLAUSE and a WHERE CLAUSE and
explain with examples? (Marks: 10)
10. Explain Group by key word using contents of any tables in question 5 or question 6.
(Marks: 10)

Diploma in Information Communication Technology (NVQ Level –V)

You might also like