You are on page 1of 7

CO-11 PART-A

1.A _________ consists of a sequence of query and/or update statements.


A) Transaction
B) Commit
C) Rollback
D) Flashback
Answer: A
2.Which of the following makes the transaction permanent in the database?
A) View
B) Commit
C) Rollback
D) Flashback
Answer: B
3.Consider the following action:
TRANSACTION.....
Commit;
ROLLBACK;
What does Rollback do?
A) Undoes the transactions before commit
B) Clears all transactions
C) Redoes the transactions before commit
D) No action
Answer: D
4.The log is a sequence of _________ recording all the update activities in the
database.
A) Log records
B) Records
C) Entries
D) Redo
Answer: A
5.In the ___________ scheme, a transaction that wants to update the database first
creates a complete copy of the database.
A) Shadow copy
B) Shadow Paging
C) Update log records
D) All of the mentioned
Answer: A
6.The ____________ scheme uses a page table containing pointers to all pages; the
page table itself and all updated pages are copied to a new location.
A) Shadow copy
B) Shadow Paging
C) Update log records
D) All of the mentioned
Answer: B
7. ARIES uses a ___________ to identify log records, and stores it in database
pages.
A) Log sequence number
B) Log number
C) Lock number
D) Sequence
Answer: B
8.There are special redo-only log records generated during transaction rollback,
called _________ in ARIES.
A) Compensation log records
B) Read log records
C) Page log records
D) Redo log records
Answer: A
9. A collection of related data.
A) Information
B) Valuable information
C) Database
D) Metadata
Answer: C
10.Insert the appropriate key word in the blank in the query ( A is a relation)
delete ______ A
where P < 5;
A) all
B) from
C) with
D) in
Answer: A
11.Which of the following cannot be used to modify the data in a database
A) update
B) insert
C) delete
D) drop
Answer: D
12._______________ is a procedural extension of Oracle � SQL that offers language
constructs similar to those in imperative programming languages.
A) SQL
B) PL/SQL
C) Advanced SQL
D) PQL
Answer: B

CO-1 PART-B
1.Which of the following concurrency control protocols ensure both conflict
serialzability and freedom from deadlock?
(A) Time-stamp ordering
(B) mutual blocking
(C) 2-phase locking
(D) Non of above
Answer: A
2.Concurrency Control is provided in a database
A) Two-phase locking Protocol
B) Time stamp ordering Protocol
C) read phase
D A&B
Answer: D
3.A schedhule for a set of transacation must
A) conist of all instuction of those transactions
B) preserve the oder in which the instructions appear in each individual
transaction
C) both A and B
D None of these
Answer: c
4. ----- strores metadata about the structure of the database, in particular the
schema of the database
A) indices
B) data dictionary
C) data files
D) database log
Answer: B
5) Each committed transaction has an associated number to uniquely identify the
changes made by the statements within the transaction and that number is called,
_________ .
A) Supply change number
B) System change number
C) Oracle change number

D) Commit change number


Answer: B
6) -------is a database object that represents a result set and is used to
manipulation data row by row
A) trigger
B) procedure
C) cursor
D monitor
Answer: C
7.A redo record, also called a?
A) Redo entry
B) Redo thread
C) Both A & B
D) None of the above
Answer: A
8.The UNDO_RETENTION parameter in your database is set to 250 and undo retention is
not guaranteed, Which statement regarding retention of undo data is correct?
A) Undo data becomes obsolete after 750 seconds
B) Undo data gets refreshed after every 900 seconds
C) Undo data will be stored permanently after 250 seconds
D) Committed undo data would be retained for 125*2 seconds if free undo space is
available
Answer: D
9.In the following which is the default permanent tablespace?
A) TEMP
B) UNDOTBS1
C) USERS
D) None of the above
Answer: C
10.Materialized views are used to speed up
A) Query optimization
B) Query processing
C) Query management
D) Query cost
Answer: B
11.The ____________ scheme uses a page table containing pointers to all pages; the
page table itself and all updated pages are copied to a new location.
A) Shadow copy
B) Shadow Paging
C) Update log records
D) All of the mentioned
Answer: B
12.Immediate database modification technique uses
A) Both undo and redo
B) Undo but no redo
C) Redo but no undo
D) Neither undo nor redo
Answer: B
13. ______________ rolls back all transactions that were incomplete at the time of
crash.
A) Analysis pass
B) Redo pass
C) Undo pass
D) None of the mentioned
Answer: C

14. A relational algebra operation annotated with instructions on how to evaluate


it is called _______
A) Evaluation algebra
B) Evaluation plan
C) Evaluation primitive
D) Evaluation engine
Answer: C

15.The __________ property ensures that any instance of the original relation can
be identified from corresponding instances of the smaller relations.
A) Lossless-join
B) Lossy-join
A) Both a and b
D) None of the above
Answer: a
16.The value of a foreign key attribute A of table R that refers to table S cannot
be NULL if which of the following holds?
A) If attribute A is part of a primary key attribute in R
B) If attribute A refers the primary key of S
C) If attribute A is UNIQUE
D) If either a or b or both holds
Answer: d
17.Relational Algebra is a ________________ language.
A) Data Definition Language
B) Procedural Language
C) Non-Procedural Language
D) Data Manipulation Language
Answer: B
18. Which of the following is used in SQL to redefine/modify the definition of a
table which already exists?
A) UPDATE
B) SET
C) ALTER
D) Non of the above
Answer: C
19.A space efficient representation of expressions which avoids making
-----------copies of subexpressions
A) singile
B) double
c) multiple
D) Non of the above
Answer: C
20) The processor used to run the code of the queries of interpreted mode
A) Runtime database processor
B) Query optimization processor
C) Parser runtime processor
D) query graphic processor
Answer: A

CO1 PART-3
1. Let R1(a,b,c) and R2(x,y,z) be two relations in which a is the foreign key of R1
that refers to the primary key of R2 . Consider following four options.

(i) Insert into R1


(ii) Insert into R2
(iii) Delete from R1
(iv) Delete from R2
Which of the following is correct about the referential integrity constraint with
respect to above ?
A) Operations (i) and (ii) will cause violation.
B) Operations (ii) and (iii) will cause violation.
C) Operations (iii) and (iv) will cause violation.
D) Operations (iv) and (i) will cause violation.
Answer : D

2. Consider the following database table:


create table test (
one integer,
two integer,
primary key(one),
unique(two),
check(one>=2 and <=20),
check(two>=1 and <=20)
)
How many data records/tuples atmost can this table contain?
A) 2
B) 10
C) 20
D) 50
Answer : C

3.Consider the following three SQL queries (Assume the data in the people table):
Select Name from people where Age>18;
Select Name from people where Height>165;
Select Name from people where (Age>18) or (Height>165);
If the SQL queries a and b above, return 8 rows and 5 rows in the result set
respectively, then what is one possible number of rows returned by the SQL query c?

A) 10
B) 8
C) 5
D) 21
Answer : B

4.A primary key, if combined with a foreign key creates


A) network model between the tables that connect them
B) many-to-many relatonship between the tables that connect them
C) parent child relationship between the tables that connect them
D) none of these
Answer : C

5. SELECT a2.first name, a2.last name, i.interest


FROM accounts AS a1, accounts AS a2, likes AS l1, likes AS
l2, interests AS i
WHERE a1.user id = uid
AND a2.user id != uid
AND a1.home town = a2.home town
AND a1.age BETWEEN a2.age - 2 AND a2.age + 2
AND l1.user id = a1.user id
AND l2.user id = a2.user id
AND l1.interest id = l2.interest id
AND l2.interest id = i.interest id
Which of these expressions would the query optimizer most likely decide to execute
first (e.g., as one of the bottom-most nodes in the query plan) if it wants to
generate an optimal plan:

A) a1.home _town = a2.home _town


B) a1.user _id = uid
C) a2.user _id != uid
D) l1.user _id = a1.user _id

Answer : B

6.Consider the transactions T1, T2, and T3 and the schedules S1 and S2 given below.
T1 : r1 (X) ; r1 (z) ; w1 (X) ; w1 (z)
T2 : r2 (X) ; r2 (z) ; w2 (z)
T3 : r3 (X) ; r3 (X) ; w3 (Y)
S1: r1(X); r3(Y); r3(X); r2(Y); r2(Z); w3(Y); w2(Z); r1(Z); w1(X); w1(Z)
S2: r1(X); r3(Y); r2(Y); r3(X); r1(Z); r2(Z); w3(Y); w1(X); w2(Z); w1(Z)

Which one of the following statements about the schedules is TRUE?


A. Only S1 is conflict-serializable.
B. Only S2 is conflict-serializable.
C. Both S1 and S2 are conflict-serializable.
D. Neither S1 nor S2 is conflict-serializable.

Answer : B

7.SELECT distinct branch.adresse


FROM accounts, branch
WHERE
accounts.branchnum = branch.number
and accounts.balance > 10000

which Query will perform this Query opareation


A) Point Query
B) Range Query
C) Join Query
D) Grouping Query
Answer : C

8.Given the basic ER and relational models, which of the following is INCORRECT?
A. An attribute of an entity can have more than one value
B. An attribute of an entity can be composite
C. In a row of a relational table, an attribute can have more than one value
D. In a row of a relational table, an attribute can have exactly one value or a
NULL value

Answer : C

9.An index is clustered, if


A. it is on a set of fields that form a candidate key
B. it is on a set of fields that include the primary key
C. the data records of the file are organized in the same order as the data
entries of the index
D. the data records of the file are organized not in the same order as the data
entries of the index
Answer : C

10.The following functional dependencies hold for relations R(A, B, C) and S(B, D,
E) B -> A, A ->C The relation R contains 200tuples and the relation S contains
100tuples. What is the maximum number of tuples possible in the natural join R S?
A. 100
B. 200
C. 300
D. 2000

Answer : A

You might also like