Monday, September 21, 2020

Database Systems MCQ

 Q.1 The cost of reading and writing temporary files while evaluating a query can be reduced by

(A) building indices 

(B) pipelining

(C) join ordering 

(D) none of the above

Ans: (B)


Q.2 A transaction is in __________ state after the final statement has been executed.

(A) partially committed 

(B) active

(C) committed 

(D) none of the above

Ans: (C)


Q.3 In multiple granularity of locks SIX lock is compatible with

(A) IX 

(B) IS

(C) S 

(D) SIX

Ans: (B)


Q.4 The statement that is executed automatically by the system as a side effect of the modification of the database is

(A) backup 

(B) assertion

(C) recovery 

(D) trigger

Ans: (D)


Q.5 The normal form that is not necessarily dependency preserving is

(A) 2NF 

(B) 3NF

(C) BCNF 

(D) 4NF

Ans: (A)


Q.6 A functional dependency of the form x -> y is trivial if

(A) y Í x 

(B) y Ì x

(C) x Í y 

(D) x Ì y

Ans: (A)


Q.7 The normalization was first proposed by ______________.

(A) Code 

(B) Codd

(C) Boyce Codd 

(D) Boyce

Ans: (B)


Q.8 The division operator divides a dividend A of degree m+n by a divisor relation B of

degree n and produces a result of degree

(A) m – 1 

(B) m + 1

(C) m * m 

(D) m

Ans: (D)


Q.9 Which of the following is not a characteristic of a relational database model?

(A) Table 

(B) Tree like structure

(C) Complex logical relationship 

(D) Records

Ans: (B)


Q.10 Assume transaction A holds a shared lock R. If transaction B also requests for a shared lock on R.

(A) It will result in a deadlock situation.

(B) It will immediately be rejected.

(C) It will immediately be granted.

(D) It will be granted as soon as it is released by A .

Ans: (C)


Q.11 In E-R Diagram total participation is represented by

(A) double lines 

(B) Dashed lines

(C) single line 

(D) Triangle

Ans: (A)


Q.12 The FD A -> B , DB -> C implies

(A) DA -> C 

(B) A -> C

(C) B -> A 

(D) DB -> A

Ans: (A)


Q.13 The graphical representation of a query is ________.

(A) B-Tree 

(B) graph

(C) Query Tree 

(D) directed graph

Ans: (C)


Q.14 Union operator is a :

(A) Unary Operator 

(B) Ternary Operator

(C) Binary Operator 

(D) Not an operator

Ans: (C)


Q.15 Relations produced from an E-R model will always be

(A) First normal form. 

(B) Second normal form.

(C) Third normal form. 

(D) Fourth normal form.

Ans: (A)


Q.16 Manager salary details are hidden from the employee .This is

(A) Conceptual level data hiding.

(B) External level data hiding.

(C) Physical level data hiding.

(D) None of these.

Ans: (A)


Q.17 Which of the following is true for network structure?

(A) It is a physical representation of the data.

(B) It allows many to many relationship.

(C) It is conceptually simple.

(D) It will be the dominant database of the future.

Ans: (A)


Q.18 Which two files are used during operation of the DBMS?

(A) Query languages and utilities

(B) DML and query language

(C) Data dictionary and transaction log

(D) Data dictionary and query language

Ans: (C )


Q.19 A list consists of last names, first names, addresses and pin codes. If all people in the list have the same last name and same pin code a useful key would be

(A) the pin code

(B) the last name

(C) the compound key first name and last name

(D) Tr from next page

Ans: (C )


Q.20 In b-tree the number of keys in each node is ____ than the number of its children.

(A) one less 

(B) same

(C) one more 

(D) half

Ans: (A)


Q.21 The drawback of shadow paging technique are

(A) Commit overhead 

(B) Data fragmentation

(C) Garbage collection 

(D) All of these

Ans: (D)


Q.22 Which normal form is considered adequate for normal relational database design?

(A) 2NF 

(B) 5NF

(C) 4NF 

(D) 3NF

Ans: (D)


Q.23 Which of the following addressing modes permits relocation without any change over in the code?

(A) Indirect addressing 

(B) Indexed addressing

(C) PC relative addressing 

(D) Base register addressing

Ans: (B)


Q.24 In a multi-user database, if two users wish to update the same record at the same time, they are prevented from doing so by

(A) jamming 

(B) password

(C) documentation 

(D) record lock

Ans: (D)


Q.25 The values of the attribute describes a particular_____________

(A) Entity set 

(B) File

(C) Entity instance 

(D) Organization

Ans: (C)

Saturday, September 19, 2020

Database Systems MCQ

 Q.1 When R∩S = Ф , then the cost of computing R|><|S is

(A) the same as R × S

(B) greater the R × S

(C) less than R × S

(D) cannot say anything

Ans: (A)

 

Q.2 In SQL the word ‘natural’ can be used with

(A) inner join

(B) full outer join

(C) right outer join

(D) all of the above

Ans: (A)

 

Q.3 The default level of consistency in SQL is

(A) repeatable read

(B) read committed

(C) read uncommitted

(D) serializable

Ans: (D)

 

Q.4 If a transaction T has obtained an exclusive lock on item Q, then T can

(A) read Q

(B) write Q

(C) both read and write Q

(D) write Q but not read Q

Ans: (C)

 

Q.5 Shadow paging has

(A) no redo

(B) no undo

(C) redo but no undo

(D) neither redo nor undo

Ans: (A)

 

Q.6 If the closure of an attribute set is the entire relation then the attribute set is a

(A) superkey

(B) candidate key

(C) primary key

(D) not a key

Ans: (A)

 

Q.7 DROP is a ______________ statement in SQL.

(A) Query

(B) Embedded SQL

(C) DDL

(D) DCL

Ans: (C)

 

Q.8 If two relations R and S are joined, then the non matching tuples of both R and S are ignored in

(A) left outer join

(B) right outer join

(C) full outer join

(D) inner join

Ans: (D)

 

Q.9 The keyword to eliminate duplicate rows from the query result in SQL is

(A) DISTINCT

(B) NO DUPLICATE

(C) UNIQUE

(D) None of the above

Ans: (C)

 

Q.10 In 2NF

(A) No functional dependencies (FDs) exist.

(B) No multivalued dependencies (MVDs) exist.

(C) No partial FDs exist.

(D) No partial MVDs exist.

Ans: (C)

 

Q.11 Which one is correct statement?

Logical data independence provides following without changing application programs:

(i) Changes in access methods.

(ii) Adding new entities in database

(iii) Splitting an existing record into two or more records

(iv) Changing storage medium

(A) (i) and (ii) (B) (iv) only, (C) (i) and (iv) (D) (ii) and (iii)

Ans: (D)

 

Q.12 In an E-R, Y is the dominant entity and X is a subordinate entity. Then which of the following is incorrect :

(A) Operationally, if Y is deleted, so is X

(B) existence is dependent on Y.

(C) Operationally, if X is deleted, so is Y.

(D) Operationally, if X is deleted, & remains the same.

Ans: (C)

 

Q.13 Relational Algebra is

(A) Data Definition Language .

(B) Meta Language

(C) Procedural query Language

(D) None of the above

Ans: (C)

 

Q.14 Which of the following aggregate functions does not ignore nulls in its results?.

(A) COUNT .

(B) COUNT (*)

(C) MAX

(D) MIN

Ans: (B)

 

Q.15 R (A,B,C,D) is a relation. Which of the following does not have a lossless join dependency preserving BCNF decomposition

(A) A->B, B->CD

(B) A->B, B->C, C->D .

(C) AB->C, C->AD

(D) A->BCD

Ans: (D)

 

Q.16 Consider the join of relation R with a relation S. If R has m tuples and S has n tuples, then the maximum and minimum size of the join respectively are

(A) m+n and 0

(B) m+n and |m-n|

(C) mn and 0

(D) mn and m+n

Ans: (C)

 

Q.17 Maximum height of a B+ tree of order m with n key values is

(A) Logm(n)

(B) (m+n)/2

(C) Logm/2(m+n)

(D) None of these

Ans: (D)

 

Q.18 Which one is true statement :

(A) With finer degree of granularity of locking a high degree of concurrency is possible.

(B) Locking prevents non – serializable schedules.

(C) Locking cannot take place at field level.

(D) An exclusive lock on data item X is granted even if a shared lock is already held on X.

Ans: (A)

 

Q.19 Which of the following statement on the view concept in SQL is invalid?

(A) All views are not updateable

(B) The views may be referenced in an SQL statement whenever tables are referenced.

(C) The views are instantiated at the time they are referenced and not when they are defined.

(D) The definition of a view should not have GROUP BY clause in it.

Ans: (D)

 

Q.20 Which of the following concurrency control schemes is not based on the serializability property?

(A) Two – phase locking

(B) Graph-based locking

(C) Time-stamp based locking

(D) None of these

Ans: (D)

 

Q.21 Which of the following is a reason to model data?

(A) Understand each user’s perspective of data

(B) Understand the data itself irrespective of the physical representation

(C) Understand the use of data across application areas

(D) All of the above

Ans: (D)

 

Q.22 If an entity can belong to only one lower level entity then the constraint is

(A) disjoint

(B) partial

(C) overlapping

(D) single

Ans: (B)

 

Q.23 The common column is eliminated in

(A) theta join

(B) outer join

(C) natural join

(D) composed join

Ans: (C )

 

Q.24 In SQL, testing whether a subquery is empty is done using

(A) DISTINCT

(B) UNIQUE

(C) NULL

(D) EXISTS

Ans: (D)

 

Q.25 Use of UNIQUE while defining an attribute of a table in SQL means that the attribute

values are

(A) distinct values

(B) cannot have NULL

(C) both (A) & (B)

(D) same as primary key

Ans: (C)

Search Aptipedia