Top Banner
16

6302 [ Turn over...2. a) What is the difference between a database and a table ? b) Why are entity integrity and referential integrity important in a database ? 2 + 3 3. a) What is

Mar 18, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 6302 [ Turn over...2. a) What is the difference between a database and a table ? b) Why are entity integrity and referential integrity important in a database ? 2 + 3 3. a) What is
Page 2: 6302 [ Turn over...2. a) What is the difference between a database and a table ? b) Why are entity integrity and referential integrity important in a database ? 2 + 3 3. a) What is

6302 [ Turn over

Name : …………………………………………….……………… Roll No. : …………………………………………...…………….. Invigilator’s Signature : ………………………………………..

CS/B.TECH(IT)/SEM-6/IT-604/2011

2011 DATABASE MANAGEMENT SYSTEM

Time Allotted : 3 Hours Full Marks : 70

The figures in the margin indicate full marks. Candidates are required to give their answers in their own words

as far as practicable.

GROUP – A ( Multiple Choice Type Questions )

1. Choose the correct alternative for the following: 10 × 1 = 10

i) One of the shortcomings of file system is

a) data availability b) fixed records

c) sequential records d) lack of security.

ii) A trigger is

a) a statement that enables to start any DBMS

b) a statement that is executed by the user when

debugging an application program

c) a condition the system tests for the validity of the

database user

d) a statement that is executed automatically by the

system of a modification.

Page 3: 6302 [ Turn over...2. a) What is the difference between a database and a table ? b) Why are entity integrity and referential integrity important in a database ? 2 + 3 3. a) What is

CS/B.TECH(IT)/SEM-6/IT-604/2011

6302 2

iii) One difference between TRUNCATE and DELETE

command is

a) TRUNCATE deletes the table but DELETE only

deletes records

b) DELETE operation can be rolled back, but

TRUNCATE operation cannot be rolled back

c) TRUNCATE can be rolled back but DELETE cannot

be rolled back

d) TRUNCATE is a DML command but DELETE is a

DDL command.

iv) Which defining a numeric number field that can hold 3

digits before the decimal point and 3 digits after the

decimal points, the width would be given as

a) 6 b) 7

c) 8 d) 3.

v) Advantage of locking algorithms in concurrent execution

of DB transaction is ............

a) deadlock

b) concurrency

c) consistency

d) none of these.

vi) Consider the schema R = ( S, T, U, V ) and the dependencies VUUTTS →→→ ,, and .SV → Let

)R2 and1(RR = be a decomposition such that

.21 θ=∩ RR The decomposition is :

a) Not in 2NF b) In 2NF but not in 3NF

c) In 3NF but not in 2NF d) In both 2NF and 3NF.

Page 4: 6302 [ Turn over...2. a) What is the difference between a database and a table ? b) Why are entity integrity and referential integrity important in a database ? 2 + 3 3. a) What is

CS/B.TECH(IT)/SEM-6/IT-604/2011

6302 3 [ Turn over

vii) EMPNO ENAME SAL

A822 RAMASWAMY 3500

A812 NARAYAN 5000

A973 UMESH 2850

A500 BALAJI 5750

Use these data for the following questions.

Select SAL from EMP E1 where 3 > ( Select count ( * )

from Emp E2 where )21 SALESALE ⋅>⋅ will retrieve

a) 3500,5000,2500 b) 5000,2850

c) 2850,5750 d) 5000,5750.

viii) The information about data in a database is called

a) meta data b) tera data

c) hyper data d) none of these.

ix) },,,,{},,,,{ KLLJKJILKIFLKJIR →→→→== The

candidate keys are

a) J and K b) JK

c) Only I d) JK and JL.

x) Consider the primary key foreign key relationship

between Employee and Department table via Dept ID

column. If you try to delete a department in Department

table which is referred in Employee table, Oracle by

default does not allow this. This is known as ON

DELETE...............

a) SET CASCADE b) SET DEFAULT

c) RESTRICT d) SET NULL.

Page 5: 6302 [ Turn over...2. a) What is the difference between a database and a table ? b) Why are entity integrity and referential integrity important in a database ? 2 + 3 3. a) What is

CS/B.TECH(IT)/SEM-6/IT-604/2011

6302 4

GROUP – B

( Short Answer Type Questions ) Answer any three of the following. 3 × 5 = 15

2. a) What is the difference between a database and a table ?

b) Why are entity integrity and referential integrity

important in a database ? 2 + 3

3. a) What is lossless decomposition ?

b) Draw a functional dependency diagram (FD diagram)

that is in 3NF but not in BCNF. Decompose that FD

diagram into BCNF.

4. Design a Generalization-Specialization hierarchy for a motor-

vehicle sales company. The company sells motor-cycles,

passenger cars, vans, buses. Justify your placement of

attributes at each level of the hierarchy. Explain why they

should not be placed at a higher or lower level.

5. What is the difference between Primary Index, Secondary

Index and Clustering Index ?

6. What are the recovery implications of :

a) forcing buffers to the database at COMMIT ?

b) fever physically writing buffers to the database prior to

COMMIT ? 212

212 +

Page 6: 6302 [ Turn over...2. a) What is the difference between a database and a table ? b) Why are entity integrity and referential integrity important in a database ? 2 + 3 3. a) What is

CS/B.TECH(IT)/SEM-6/IT-604/2011

6302 5 [ Turn over

GROUP – C

( Long Answer Type Questions ) Answer any three of the following. 3 × 15 = 45

7. a) Hotel ( Hotel No, Hotel Name, Address )

Room ( Room No, Hotel No, Type, Price_pn)

Booking ( Hotel No, Guest No, Date From, Date To,

Room No )

Guest ( Guest No. Guest Name, Guest Address )

where the underlined column names are primary key.

Write down expressions in relational algebra for the

following queries :

i) list all the hotels which are situated in Kolkata

ii) list all single rooms with a charge below Rs. 1000

per night

iii) list the names of all guest who are going to stay at

ITC hotel from 25th December to 1st January.

iv) list the price per night and type of all rooms at

Grand Hotel. 6

b) What do you mean by composite attribute and derived

attribute ? Give example. 2

c) Some of the entities relevant to a technical university

are given below :

i) STUDENT and ENGG-BRANCH (students register

for engg branches)

ii) BOOK and BOOK-COPY ( books have copies )

Page 7: 6302 [ Turn over...2. a) What is the difference between a database and a table ? b) Why are entity integrity and referential integrity important in a database ? 2 + 3 3. a) What is

CS/B.TECH(IT)/SEM-6/IT-604/2011

6302 6

iii) ENGG-BRANCH and SECTION (branches have

section)

iv) SECTION and CLASS-ROOM ( sections are

scheduled in classrooms )

v) FACULTY and ENGG-BRANCH ( faculty teaches in

a particular branch )

For each of them, indicate the type of relationship existing

among them ( for example, one-to-one, one-to-many or

many-to-many ). Draw a relationship diagram for each of

them. 5

d) An E-R diagram can be viewed as a graph. What do the

following means in terms of the structure of an

enterprise schema ?

i) The graph is disconnected

ii) The graph is cyclic 2

8. a) Compute the closure of the following set F of functional

dependencies for relational scheme.

R = ( A, B, C, D, E )

A–> BC, CD–> E, B–> D, E–>A 3

b) Consider the relation R = { A, B, C, D, E, F, G, H, I, J }

and the set of functional dependencies :

F = { AB–> C, A–> DE, B–> F, F–> GH, D–> IJ }

Decompose R into 3NF. 5

c) What do you mean by lossless and dependency

preserving decomposition ? 4

d) What is MDV ? Explain with an example. 3

Page 8: 6302 [ Turn over...2. a) What is the difference between a database and a table ? b) Why are entity integrity and referential integrity important in a database ? 2 + 3 3. a) What is

CS/B.TECH(IT)/SEM-6/IT-604/2011

6302 7 [ Turn over

9. a) Consider relation R ( A, B, C ) and a set of functional

dependencies F = { A–> BC, B–> C, A–>B, AB–>C }

Compute the canonical cover for F. 6

b) Define BCNF. How does it differ from 3NF ? Why is

BCNF considered to be stronger than 3NF ? 4

c) Draw a functional dependency diagram that is in 3NF

but not in BCNF. Decompose that FD diagram into

BCNF. 3

d) Explain candidate key with an example. 2

10. a) State Two-phase Commit protocol and discuss the

implications of a failure on the part of

i) the coordinator

ii) a participant, during each of the two phases. 4

b) Describe the wait-die and wound-wait protocols for

deadlock prevention. 2

c) Define three concurrency problems : dirty read, non-

repeatable read, phantoms. 3 d) Let 21, TT , and 3T be transactions that operate on the

same data items A, B and C. Let 1r ( A ) mean that 1T

reads A, 1w ( A ) means that 1T writes A and so on for

2T and 3T . Consider the following schedule

),B(),A(),A(),C(),B(),B(,(B),(C):Sl 31133222 wwrrrwrr

)A(),B(),B(),A(),C( 21123 wwrrw

Is the schedule serializable ? 3

e) What are the roles of the Analysis, Redo and Undo

phases in the recovery algorithm 'ARIES'. 3

Page 9: 6302 [ Turn over...2. a) What is the difference between a database and a table ? b) Why are entity integrity and referential integrity important in a database ? 2 + 3 3. a) What is

CS/B.TECH(IT)/SEM-6/IT-604/2011

6302 8

11. a) State the difference between the following in brief :

Primary Index versus Secondary Index.

b) What is blocking factor ? Explain the difference between

B-tree and B+tree indexing with proper example.

c) Explain deferred update technique for recovery with its

advantages and disadvantages.

d) What are the causes of bucket overflow in a hash file

organization ?

e) Construct a B+ tree for the following set of key values :

( 2, 3, 5, 7, 11, 17, 19, 23, 29, 31 )

Assume that the tree is initially empty and values are

added in ascending order. Construct B+ -trees for the

cases where the numbers of pointers that will fit in one

node is as follows :

i) Four

ii) Six

iii) Eight

Page 10: 6302 [ Turn over...2. a) What is the difference between a database and a table ? b) Why are entity integrity and referential integrity important in a database ? 2 + 3 3. a) What is

6302 [ Turn over

Name : …………………………………………….……………… Roll No. : …………………………………………...…………….. Invigilator’s Signature : ………………………………………..

CS/B.TECH(IT)/SEM-6/IT-604/2012

2012 DATABASE MANAGEMENT SYSTEM

Time Allotted : 3 Hours Full Marks : 70

The figures in the margin indicate full marks. Candidates are required to give their answers in their own words

as far as practicable.

GROUP – A ( Multiple Choice Type Questions )

1. Choose the correct alternatives for any ten of the following :

10 × 1 = 10

i) A table can have only one

a) Primary key b) Candidate key

c) Super key d) all of these.

ii) What is the smallest unit of data in a relational model ?

a) Data type b) Field

c) Data value d) None of these.

iii) 2 NF is always in

a) INF b) BCNF

c) MUD d) None of these.

Page 11: 6302 [ Turn over...2. a) What is the difference between a database and a table ? b) Why are entity integrity and referential integrity important in a database ? 2 + 3 3. a) What is

CS/B.TECH(IT)/SEM-6/IT-604/2012

6302 2

iv) Select operation in SQL is a

a) data query language

b) data definition language

c) DML

d) DCL.

v) In ER model symbol is used for

a) attribute b) entity

c) relation d) none of these.

vi) BCNF is a type of

a) Indexing b) DFD

c) Normalization d) none of these.

vii) What is the cardinality of a table with 1000 rows and 10

columns ?

a) 10 b) 100

c) 1000 d) None of these.

viii) Which operator performs pattern matching in SQL ?

a) Except b) Intersect

c) Like d) All of these.

ix) An index on the search key is called a

a) primary index b) secondary index

c) multilevel index d) all of these.

Page 12: 6302 [ Turn over...2. a) What is the difference between a database and a table ? b) Why are entity integrity and referential integrity important in a database ? 2 + 3 3. a) What is

CS/B.TECH(IT)/SEM-6/IT-604/2012

6302 3 [ Turn over

x) Which phase is not part of a two phase locking

protocol ?

a) Growing phase b) Shrinking phase

c) Stabilization phase d) None of these.

xi) The data dictionary tells the DBMS,

a) What files are in the database

b) What attributes are possessed by data

c) What these files contain

d) All of these.

xii) Fore DMC commands are

a) Create, update, delete, select

b) Insert, update, drop, select

c) Create, alter, delete, select

d) Insert , modify, delete, select.

xiii) Which is not an ACID property ?

a) Atomicity b) Integrity

c) Consistency d) Durability.

GROUP – B ( Short Answer Type Questions )

Answer any three of the following. 3 × 5 = 15

2. Explain DDL, DML & DCL.

Page 13: 6302 [ Turn over...2. a) What is the difference between a database and a table ? b) Why are entity integrity and referential integrity important in a database ? 2 + 3 3. a) What is

CS/B.TECH(IT)/SEM-6/IT-604/2012

6302 4

3. Consider the following “Sailor” and “Reserve” relation :

Reserve (sid, bid, day)

Sailor (sid, sname, rating, age)

Formulate relational algebra Query :

a) Find names of sailors who have reserved boat # XXX.

b) Find names and ages of sailors who have reserved a

boat. 221 + 2

21

4. Explain “two phase” locking protocol.

5. Define BCNF. How does it differ from 3NF ? Why is it

considered stronger than 3 NF ?

6. Discuss the “entity integrity” and “referential integrity”

constraint. Why is it considered important ? Explain with

suitable example.

GROUP – C

( Long Answer Type Questions )

Answer any three of the following. 3 × 15 = 45

7. a) Find out the closure of attribute set (AG) i.e. (AG)+ in the

R.

Set of FD’s F are as given below :

R = { A, B, C, G, H, I }

F = { A → B, A → C, CG → H, CG → I, B → H } is (AG) is

a super key of R ?

Page 14: 6302 [ Turn over...2. a) What is the difference between a database and a table ? b) Why are entity integrity and referential integrity important in a database ? 2 + 3 3. a) What is

CS/B.TECH(IT)/SEM-6/IT-604/2012

6302 5 [ Turn over

b) What are the differences between Embedded SQL and Dynamic SQL ?

c) Define super key, candidate key and primary key.

d) Compare between 3NF and BCNF with example.

5 + 2 + 3 + 5

8. a) Consider the following relation and write question in SQL :

w) Flights (flow, from, to, distance, departs, arrives, price)

x) Aircraft (Aid, aname, cruising – range).

y) Certified (eid, aid).

z) Employees (eid, ename, salary)

i) Identify the flights that can be piloted by every pilot whose salary is more than $ 1,00,000.

ii) Find the eids of employees who make the second highest salary.

iii) Find the names of pilots who can aperate

planes with a range greater than 3000 mintes but are not certified on any Boeing aircraft.

iv) Print the names and salary of every non-pilot whose salary is more than average salary for pilots.

b) Specify the query in SQL to declare a “Cursor” to find

names & cities of residence of customers who have both an account and a loan at a particular bank branch in the same city as that customer.

Page 15: 6302 [ Turn over...2. a) What is the difference between a database and a table ? b) Why are entity integrity and referential integrity important in a database ? 2 + 3 3. a) What is

CS/B.TECH(IT)/SEM-6/IT-604/2012

6302 6

c) The sales man-master table records the salesman-no,

name, rate-of-commission, qtd-sales. The commission-

amount and date-of-payment along with the salesman-

no is calculated and recorded in commission-payable

table.

Write a PL/SQL block of code such that depending upon

the user entered salesman-no, the Commission-amount

is calculated and inserted into the commission-payable

table. 4 + 5 + 6

9. a) What are dense and sparse indexing ? Explain with an

example.

b) Create a B+ tree with the plowing key :

order-3, key = 8, 5, 1, 7, 3, 12, 9, 6.

c) What is a view ? 6 + 7 + 2

10. a) What is multiple inheritance ?

b) What is attribute inheritance ?

c) Draw ER diagram showing cardinality :

A bill is sent to a customer. A customer may receive

many bills. A clerk works in a bank. A bank has many

clerks. Students appear for seats in a college. Each

student can get almost one seat. A college has many

seats. A student can sent many applications.

d) With an example describe specialization and

generalisation. 2 + 2 + 4 + 2 + 2 + 3

Page 16: 6302 [ Turn over...2. a) What is the difference between a database and a table ? b) Why are entity integrity and referential integrity important in a database ? 2 + 3 3. a) What is

WBUT Information TechnologyEngineering 6th Semester Previous

Year Question Paper

Publisher : Faculty Notes Author : Panel Of Experts

Type the URL : http://www.kopykitab.com/product/10210

Get this eBook

50%OFF