Sei sulla pagina 1di 5

Visit hiddencomputertricks.blogspot.

com
for more...

Mumbai University

Bachelor of Information Technology (B.Sc. IT)


Third year Semester V

Structural Query Language II


November 2007
Con /4464-07. BS - 4566

(3 Hours) [Total Marks: 100

N.B 1. Question No.1 is Compulsory.


. 2. From the remaining (Q Nos. 2 to 7) attempt any four.
3. Draw neat labeled diagram whenever necessary
4. Answer to the same questions must be written together

Q1 Answer the following~ 20

a Explain the terms primary key and foreign key with examples
)
Explain SOL and Java Integration (JDBC).
b
) State and explain the 12 rules that a database must satisfy to
be considered truly relational.
c
) Perform the following queries by referring the tables given after
the Q7.

i. Create a table STUDDETAIL with the given constraints.


d ii. Add a column DIV varchar to the CLASSMASTER table.
) iii. Write a query to change the Reservation for 'OBC' caste
from 19% to 23%.
iv. Calculate the average age of' T.Y. B.Sc. (I.T.)' class.
v. List the students whose last name ends with 'd'.
Q2 Answer the following:

a Bring out the enhancements in SQL2 standards compared to 06


) SQL - 89 standards.

What is transaction? Explain the Uncommitted Data Problem?


06
b Perform the following queries by referring the tables given after
) the 07.: 08

c i. List the Information in the following format:


) ii. Registration No. I Class I Student I Total Fees Paid
iii. Calculate the 19% seats for 'OBC' category when the
total intake is 60 for F.Y. B.Sc. I.T'.
iv. Display all the students who Were admitted between 15-
Page 1

May-2007 to 10 June-2007
v. Display all the students who were born on 01-June-1984

Hi
Visit hiddencomputertricks.blogspot.com
for more...

vi. List all the classes having total fees more than
Rs.18,000.
vii. List the total number of girls admitted in F. Y. Biotech
class.
viii. Calculate the total fees Collected on the date 25-05-
2007.
ix. Truncate the table CLASS_MASTER.
Q3 Answer the following:

a Explain the UPDATE statement with examples. 06


)
How is SQL query processed? Explain the rules. 06
b
) Perform the following queries by referring the tables given after 08
the 07.
c
) i. Display total seats remaining for F. Y. B.Sc. I. T. class for
each caste.
ii. Display all the boys in descending order group by each
class.
iii. Display the total students admitted in the month of MAY
and JUNE separately.
iv. List the students of F.Y. B.Sc. IT. who cancelled the
admission in the month of AUGUST.
Q4 Answer the following:

a Explain the ORDER BY and GROUP BY clause with examples. 06


)
What are joins? Explain equi-join and non equi-joins. 06
b
) Perform the following queries by referring the tables given after 08
the 07.
c
) i. List the total number of admission cancelled in the
month of 'JUL Y' and year 2001 for 'S.Y. B. Sc IT for 'OBC'
caste.
ii. List the total amount refunded for each class.
iii. List all the students who had a balance fees for the class
T.Y. B.Sc. I.T' and, T. Y. B.Sc. C.S',
iv. Create a view V_STUD from the table STUDMASTER,
STUDDETAIL with the following fields "
(RegNo, ClassID, StudLName, AdmDate, FreeShip,
AdmStatus)

Q5 Answer the following:

a Explain the MATCH FULL and MATCH PARTIAL options of the 06


) CREATE TABLE statements to handle NULL values in foreign
keys for integrity constraints.

What is locking? Why is it required? Explain the different


locking' parameters. 06
b Perform the following queries by referring the tables given after
) the Q7.
Page 1

08
i. List the caste with second highest reservation.

Hi
Visit hiddencomputertricks.blogspot.com
for more...

c ii. Display the vacant seats for 'M.C.A Part-I' for all
) categories.
iii. Calculate the total Amount collected by DD (Demand
Draft) for each class.
iv. List all the students who had paid only the cash amount.
Q6 Answer the following:

a What is a view? Explain horizontal and vertical views with 06


) examples
06
b What are sub-queries? Explain the Set membership test with
) example, 08

c Perform the following queries by referring the tables given after


) the Q7.

i. List the summary for total number of Girls and Boys


admitted in each class using group by and order by
clause.
ii. Display the total fees collected for each class using
HAVING clause.
iii. List the students having their Emailid with@gmail.com.
iv. Display the students whose LastName starts with 'G'
followed by 'a' as third character.
Q7 Answer the following:

a Explain the NVL, COALESCE and NULLIF expressions with 06


examples,
)
Write a notes on: 06
b
) i. Single database architecture
ii. File-server architecture
Perform the following queries by referring the tables given after 08
the Q7.
c i. List all the students admitted in free-ship for each class,
) ii. Use CASE expression to display total girls from 'SC' and
'ST' category admitted for each class.
iii. Display the student Last Name, EmailiD and Gender
classwise,
iv. List all the students with Invalid Email~D's,

Table STUDMASTER
Attribute Data type Constraints

RegNo ' Varchar Primary Key

ClasslD Varchar Foreign Key Ref CLASSMASTER(ClassID)

CasteCode Integer Foreign Key Ref CASTEMASTER(CasteCode)

StudFName Varchar

StudLName Varchar

DDAmt Number
Page 1

Hi
Visit hiddencomputertricks.blogspot.com
for more...

DDQate Date

Cash
Number, '
Paid

Actual Fees Number

AdmDate Date

AdmStatus Varchar A= Admitted, C - Cancelled, P- Provisional

FreeShip Varchar "Y' = Yes, 'N' - No

Table STUDDETAILS
Attribute Data tYl:>e Constraints

RegNo Varchar Foreign Key Ref STUDMASTER(Reg.No)

DOS Date' Students Birth Date'

Address Varchar

City Varchar

EmailiD Varchar

Gender Varchar 'M' ::. Male, 'F' = Female

Table CLASSMASTER
Attribute Data type Constraints.

ClassID Varchar Primary Key

ClassName Varchar

Intake Integer

Table Cancellation
Attribute Data type Constraints.

Reg.No Varchar Foreign Key

Cancellationdate Date

AmtRefunded Number
Page 1

Hi
Visit hiddencomputertricks.blogspot.com
for more...

Table CASTEMASTER
Attribute Data type Constraints

CasteCode Number Primary Key

CasteName Varchar

This field contains the value in


Reservation Number
percentage for eg 0.18 for 18%

Visit hiddencomputertricks.blogspot.com
for more...
Page 1

Hi

Potrebbero piacerti anche