Thursday, November 26, 2020

Relational database management systems mcq quiz with answers 19

MCQ on various aspects in DBMS including database schedules, indexing, data storage, normalization, database views, query optimizers and multivalued dependency questions with answers, RDBMS Multiple Choice Questions with Answers

Database management systems - MCQ exam questions


1. An attribute that can be subdivided into sub-attributes is called

(a) composite attribute

(b) derived attribute

(c) multi-valued attribute

(d) stored attribute


Answer: (a) composite attribute

Composite attribute is a type of attribute that can be divided into meaningful sub-attributes. Example: Student_Name can be a composite attribute with components Student_First_Name and Student_Last_Name sub-attributes.


2. __________ cannot accept NULL values.

(a) candidate key

(b) foreign key

(c) primary key

(d) unique attribute


Answer: (c) Primary key

Primary key is equivalent to the constraints UNIQUE + NOT NULL.


3. An attribute of a table that is linking the primary key of another table is called

(a) candidate key

(b) composite key

(c) foreign key

(d) none of these.


Answer: (c) Foreign key

Foreign key is an attribute that refers the value from other table’s Primary key or Unique attribute.


4. How do we refer all candidate keys other than the primary key?

(a) alternate keys

(b) foreign keys

(c) super keys

(d) none of these.


Answer: (a) alternate keys

The candidate keys other than the one which is chosen as primary key are called as alternate keys. (Primary key is one of the candidate keys of a table).


5. DCL commands are

(a) create and drop

(b) insert and delete

(c) grant and revoke

(d) select and update.


Answer: (c) grant and revoke

GRANT and REVOKE commands are part of Data Control Language (DCL). They are used to grant and revoke access privileges (select, insert, delete, update, create, etc.) to different database users on various database components.


6. An operation that produces a temporary relation S when performed on a relation R is called

(a) intersection

(b) join

(c) selection

(d) projection


Answer: (d) projection

Project is a relational algebra operation that refers to the creation of a relation (temporary) by selecting set of attributes from another relation (or an expression).


7. If a relation is in __________, it is also in 3NF.

(a) 2NF

(b) BCNF

(c) both (a) and (b)

(d) none of these.


Answer: (b) BCNF

A relation that is in Boyce-Codd Normal Form (BCNF) is also in Third Normal Form (3NF)


8. “Every determinant is a key” is a required property of ____.

(a) 2NF

(b) 3NF

(c) BCNF

(d) 4NF


Answer: (c) BCNF

A relation with set of functional dependencies where every determinant (LHS attribute(s)) is a key is said to be in Boyce-Codd Normal Form (BCNF).


9. A relation that is not part of the logical model, but is made visible to a user as a virtual relation, is called a

(a) relation

(b) tuple

(c) cardinality

(d) view


Answer: (d) view

A view is an unexecuted query (stored query) that can be run on demand.

A view is simply any SELECT query that has been given a name and saved in the database. For this reason, a view is sometimes called a named query or a stored query. To create a view, you use the SQL syntax:

        CREATE OR REPLACE VIEW <view_name> AS

        SELECT <any valid select query>;


10. The Index that is associated to a DataFile which is in turn sorted with respect to the search key is called 

(a) multi-level index

(b) primary index

(c) secondary index

(d) none of these.


Answer: (b) primary index

Index on Sequential File, also called Primary Index, when the Index is associated to a Data File which is in turn sorted with respect to the search key.

1. A Primary Index forces a sequential file organization on the data file;

2. Since a data file can have just one order there can be just one Primary Index for data file.


11. Rollback for a transaction is normally used to

(a) delete the transaction

(b) recover from transaction failure

(c) restore the old transaction

(d) update the transaction.


Answer: (c) restore the old transaction

Rollback will undo all the updates performed by an old transaction to restore the transaction to an old consistent state.


12. Serializability of concurrent transactions is ensured by

(a) locking

(b) time-stamping

(c) both of these

(d) none of these.


Answer: (c) both of these

Both locking and time-stamp protocols are used for ensuring serializability.


13. Cardinality ratio is the

(a) number of entities in an entity set

(b) number of entities related with other entities via a relationship

(c) number of attributes associated with an entity

(d) ratio of number of columns and rows in a table.


Answer: (b) number of entities related with other entities via a relationship

Cardinality ratio, (also called as, type of relationship) is the number of entities in one entity set that are related to number of entities in another entity set via a relationship set.

They are one-to-one, one-to-many, many-to-one, and many-to-many.


14. Which of the following queries to be executed to permanently remove all the data from the PILOT table without changing its structure?








15. Which of the following is the way to undo the effects an aborted transaction?

(a) redo the aborted transaction

(b) error control

(c) recovery

(d) rollback


Answer: (d) rollback

Rollback will undo all the updates performed by an old transaction to restore the transaction to an old consistent state.


Related posts:

Quiz questions with answers on DBMS introduction concepts

rollback, cardinality rtio

view and indexes

how many disk blocks required to store a database file of fixed size records with no spanning of records

List down all the recoverable and conflict serializable schedules

No comments:

Post a Comment

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents

data recovery