1 DBMS MCQ 1 Merged Merged
1 DBMS MCQ 1 Merged Merged
c. Internal view
d. External view
c. Conceptual Level
d. Physical Level
30. Which two files are used during a. Query languages and c. Data
operation of the DBMS utilities dictionary and
b. DML and query transaction log
language
c. Data dictionary and
transaction log
d. None of the above
Relational Data Model: Concept of relations, Schema-instance distinction, Keys, referential
integrity and foreign keys, Relational algebra operators, Tuple relation calculus, Domain
relational calculus. Physical and logical hierarchy: Concept of index, B-trees, hash index,
function index, bitmap index. Concepts of Functional dependency, Normalization (1NF, 2NF,
3NF, BCNF, etc).
21. Suppose we wish to find the Which, if any, of the two a) Both I and II
ID’s of the employees that queries above will
are managed by people who correctly (in SQL2) get the
are managed by the desired set of employee
employee with ID 123. Here ID’s?
are two possible queries: a) Both I and II
b) I only
I.SELECT ee.empID c) II only
d) Neither I nor I
FROM Emps ee, Emps ff
WHERE ee.mgrID =
ff.empID AND ff.mgrID =
123;
II.SELECT empID
FROM Emps
WHERE mgrID IN
(SELECT empID FROM
Emps WHERE mgrID =
123);
22. The transaction log includes a. The before-image of d. The essential data
which of the following? a record of the record
b. The after-image of a
record
c. The before and after-
image of a record
d. The essential data of
the record
(A) DDL
(B) DML
(C) DCL
1 (D) TCL D
(A) Rows
(B) Tables
(C) Attributes
2 (D) Tuples B
(A) Attributes
(A) Relational
(B) Hierarchical
(C) Network
7 (D) Transition D
The most commonly used operation in relational algebra for projecting a set
of tuple from a relation is
(A) Union
(B) Select
(C) Projection
8 (D)
TheJoin
_____ operation allows the combining of two relations by merging pairs B
of tubles, one from each relation, into a single tuple.
(A) Intersection
(B) Union
9 C
A _____ is an abstract model that describes how the data are organised and
represented.
(A) Database
(B) Schema
(C) Instances
(A) Table
(B) Tools
(C) Format
Relational Algebra is
A. Data Definition Language
B. Meta Language
C. Procedural query Language
39 D. None of the above C
Relational calculus is a
A. Procedural language
B. Non-Procedural language
C. Data definition language
40 D. High level language B
E-R model uses this symbol to represent the weak entity set?
A. Dotted rectangle
B. Diamond
C. Doubly outlined rectangle
41 D. None of these C
The system must create a query ____ plan before it can fully evaluate a query.
A) Optimization B) Parser
48 C) Translation D) Evaluation D
The concept whichchecks the syntax of query which is written according to
rules of the grammer is classified as
a) Query graph b) Query tree
49 c) Parser d) Scanner c
The system must create a query ____ plan before it can fully evaluate a query.
a) Optimization b) Parser
52 c) Translation d) Evaluation d
Collections of operations that form a single logical unit of work are called
__________?
a) Views b) Networks
53 c) Units d) Transactions d
a)Commit
b)Rollback
c)Savepoint
d)Deadlock
63 b
Which of the following contains a complete record of all activity that affected
the contents of a database during a certain period of time?
a)report writer
b)query language
d)transaction log
64 d
What is/are the step(s) involved in fetching the data from the database in
query processing?
a)Parsing and translation b) Optimization
67 c) Evaluation d) All of the above d
In case of any shut down during transaction before commit which of the
following statement is done automatically ?
a) View b)Commit
75 c) Rollback d) Flashback c
What is ACID properties of Transactions?
a)Atomicity, Consistency, Isolation, Database
b)Atomicity, Consistency, Isolation, Durability
c)Atomicity, Consistency, Inconsistent, Durability
d)Automatically, Concurrency, Isolation, Durability
76 b
a)Atomicity
b)Simplicity
83 b
X is read from a database and stored in a buffer in main memory with the ___
operation.
A. Read
B. Write
C. Commit
84 D. Rollback A
When dealing with database transactions, there is often a need for multiple
users to use a database to perform different operations. In this case, ___ of
the database occurs.
A. Concurrent Connection
B. Concurrent Reduction
C. Concurrent Execution
93 D. Concurrent Revolution C
During simultaneous execution, each operation should be performed
interleaved with the others, ensuring that there is no interference with the
other operations. This maintains a database ___.
A. Consistency
B. Redundancy
C. Concurrency
94 D. None C
What is TRUE about Durability?
A. The failure of the system or an error in a transaction cannot cause them to
be lost.
B. A consistent state is reached when a transaction is completed.
C. System failures cannot lead to the loss of that consistent state.
95 D. All of the above D
The concurrency ___ allows us to maintain the concurrency of the database.
A. Protocols
B. Controls
C. Control Protocols
96 D. None C
a. Create
b. Alter
c. Delete
Answer C
2) Which of the following is generally used for performing tasks like creating the structure of
the relation, deleting relation?
a. DML
b. Query
c. Relational schema
d. DDL
Answer D
b. Database administrator
c. Data admin
Answer B
4) Which of the following refers to copies of the same data (or information) occupying the
memory space at multiple places?
a. Data responsibility
b. Data inconsistency
c. Data mining
d. Data redundancy
Answer D
5) Which of the following refers to the level of data abstraction that describes exactly how the
data actually stored?
a. Conceptual level
b. Physical level
c. File level
d. Logical level
Answer B
6) Which of the following is generally used for performing tasks like creating the structure of
the relations, deleting relation?
b)Query
c)Relational Schema
Answer:d
d)Both A and C
Answer:a
8) A huge collection of the information or data accumulated form several different sources is
known as ____:
a)Data Management
b)Data Mining
c)Data Warehouse
d)Both B and C
Answer:c
b)Fields
c)Database
d)Records
Answer:d
a)Entity
b)Column
c)Cardinality
Answer:c
c)Lack of Authentication
Answer - b
12) which forms have a relation that contain information about a single entity ?
a) 4NF
b) 2NF
c) 5NF
d) 3NF
Answer - a
a) MYSQL
b) Microsoft acess
c) IBM DB2
d) Google
Answer - d
a) Storing data
c) data integrity
Answer - d
15) It is a better to use files than a DBMS when there are ........
Answer – b
A. physical level
B. logical level
C. conceptual level
D. view level
18) is, a table have more than one set of attributes that could be chosen as the key
A. foreign key
B. integrity key
C. relationship
D. candidate key
A. schema
B. application program
D. code
Ans : Schema
A. composite key
B. candidate key
C. foreign key
D. super key
Answer: d
22)In which of the following formats data is stored in the database management system?
a) Image
b) Text
c) Table
d) Graph
Answer: c
a) Hierarchical
b) Network
c) Distributed
d) Decentralized
Answer: d
a) Collection of Records
b) Collection of Keys
c) Collection of Tables
d) Collection of Fields
Answer: c
25)The DBMS acts as an interface between ______ and ______ of an enterprise-class system.
Answer: c
26)What do you mean by one to many relationship between Teacher and Class table?
Answer : [Option : B]
A.Datasheet View
B.Design View
C.Pivote TableView
D.All Of Above
Answer : C
A.Parent
B.Child
C.Sister
D.Master
Answer : [Option : B]
29)In which state one gathers and list all the necessary fields for the database design project.
A.Data Definition
B.Data Refinement
C.Establishing Relationship
Answer : [Option : A]
30)Which of the following enables us to view data from a table based on a specific criterion
A.Form
B.Query
C.Macro
D.Report
Answer : [Option : B]
Ans:-C
c) Lack of Authentication
Ans :-B
a) Storing data
c) Data Integrity
Ans :- D
a) Data
b) Data Languages
c) Data Manager
Ans:-D
d) Both A and C
Ans:- A
36) Which of the following can be used to extract or filter the data & information from the data
warehouse?
a) Data redundancy
c) Data mining
d) Both B and C
Ans:-C
37)______ is a set of one or more attributes taken collectively to uniquely identify a record.
a) Primary Key
b) Foreign key
c) Super key
d) Candidate key
Answer: c
a) Data bank
b) Data base
c) Data file
d) Data record
Answer: b
39)The property (or set of properties) that uniquely defines each row in a table is called the:
A. Identifier B. Index
C. Primary key
D. Symmetric key
40)What is a database?
c) Organized collection of data or information that can be accessed, updated, and managed
Answer: c
a) Collection of Records
b) Collection of Keys
c) Collection of Tables
d) Collection of Fields
Answer: c
42)Which of the following schema concept provides different view of relational table to
different user?
1.Physical schema
2.External schema
3.Logical schema
4.Data model
2.Dashed ellipse
3.Squared ellipse
1.Ellipse
2.Double rectangle
3.Double lines
4.Hexagons
Option 4 : Hexagons
1.spreadsheet
3.database
4.utility file
Option 3 : database
1.entities only
3. attributes only
Answer: D
Answer: A
(d) All
Answer: D
Answer: B
Answer: C
Answer: B
Answer: D
Answer: D
55)What is the name given to database management system which is capable of handling full
text data, image data, audio and video?
(c) Multimedia
(d) Hypertext
Answer: C
56)Relational model uses some unfamiliar terminology. One tuple is equal to __
(a) record
(b) field
(c) file
Answer: A
a) Drop table
b) Delete
c) Purge
d) Remove
Answer: a
58) ______ is a set of one or more attributes taken collectively to uniquely identify a record.
a) Primary Key
b) Foreign key
c) Super key
d) Candidate key
Answer: c
59)Which of the following is the subset of SQL commands used to manipulate Oracle
Structures, including tables?
Answer: d
Answer: a
61)Which of the following command is correct to delete the values in the relation teaches?
Answer: a
c) Relational algebra
d) Query language
Answer: c
b) Manipulating data
d) Analysing code
Answer: d
a) Data
b) Data Languages
c) Data Manager
Answer: d
65)The DBMS acts as an interface between ______ and ______ of an enterprise-class system.
Answer: c
66)The ability to query data, as well as insert, delete, and alter tuples, is offered by ____
Answer: d
c) Relational algebra
d) Query language
Answer: c
69)What is a database?
c) Organized collection of data or information that can be accessed, updated, and managed
Answer: c
Answer: d
a) Hierarchical
b) Network
c) Distributed
d) Decentralized
Answer: d
Answer: c
73)In the __________ normal form, a composite attribute is converted to individual attributes.
A. First
B. Second
C. Third
D. Fourth
Answer: A
D. Have all non key fields depend on the whole primary key
Answer: A
Answer: C
76)Functional Dependencies are the types of constraints that are based on______
A. Key
B. Key revisited
C. Superset key
Answer: A
A. Functional dependency
B. Database modeling
C. Normalization
D. Decomposition
Answer: C
78) Which forms simplifies and ensures that there are minimal data aggregates and repetitive
groups:
A. 1NF
B. 2NF
C. 3NF
Answer: C
79) Which forms has a relation that possesses data about an individual entity:
A. 2NF
B. 3NF
C. 4NF
D. 5NF
Answer: C
A. 1NF
B. 2NF
C. 3NF sets at
D. 4NF
Answer: C
81) Empdt1(empcode, name, street, city, state, pincode). For any pincode, there is only one
city and state. Also, for given street, city and state, there is just one pincode. In normalization
terms, empdt1 is a relation in
A. 1 NF only
Answer: B
82) We can use the following three rules to find logically implied functional dependencies. This
collection of rules is called
A. Axioms
B. Armstrong’s axioms
C. Armstrong
D. Closure
Answer: B
A. Reflexivity rule
B. Transitivity rule
C. Pseudotransitivity rule
D. Augmentation rule
Answer: C
A. Lossless decomposition
B. Lossless-join decomposition
Answer: D
85) Inst_dept (ID, name, salary, dept name, building, budget) is decomposed into instructor (ID,
name, dept name, salary) department (dept name, building, budget) This comes under
A. Lossy-join decomposition
B. Lossy decomposition
C. Lossless-join decomposition
Answer: D
86)There are two functional dependencies with the same set of attributes on the left side of the
arrow: A->BC A->B This can be combined as
A. A->BC
B. A->B
C. B->C
Answer: A
87) Consider a relation R(A,B,C,D,E) with the following functional dependencies: ABC -> DE and
D -> AB The number of superkeys of R is:
A. 2
B. 7
C. 10
D. 12
Answer: C
88) Which, if any, of the two queries above will correctly (in SQL2) desired set of employee ID’s?
A. Both I and II
B. I only
C. II only
D. Neither I nor I
Answer: A
89) Suppose now that R(A,B:) and S(A,B:) are two relations with r and s tuples, respectively
(again, not necessarily distinct). If m is the number of (not necessarily distinct) tuples in the
result of the SQL query: R intersect S; Then which of the following is the most restrictive,
correct condition on the value of m?
A. m = min(r,s)
B. 0 <= m <= r + s
Answer: D
Answer: D
A. Output specified attributes from all rows of the input relation and remove duplicate tuples
from the output
B. Outputs pairs of rows from the two input relations that have the same value on all attributes
that have the same name
C. Output all pairs of rows from the two input relations (regardless of whether or not they have
the same values on common attributes)
Answer: A
Answer: A
93) The____condition allows a general predicate over the relations being joined.
Answer: A
94) Which of the join operations do not preserve non matched tuples?
A. Left outer join
C. Inner join
D. Natural join
Answer: B
95)The normal form which satisfies multivalued dependencies and which is in BCNF is
Answer: A
Answer: B
1. Collections of operations that form a single logical unit of work are called __________
a) Views
b) Networks
c) Units
d) Transactions
Answer: d
Explanation: Collections of operations that form a single logical unit of work are called
transactions. A database system must ensure proper execution of transactions.
Answer: c
Explanation: The all or none policy is commonly referred to as atomicity. It ensures that a
work is either completed or not completed and there are no intermediate stages.
Answer: b
Explanation: Execution of translation in isolation preserves the consistency of a database. It
ensures that no other transaction is running concurrently.
Answer: b
Explanation: Simplicity is not a property of a transaction. Atomicity, Isolation, Durability are
all parts of ACID properties.
Answer: a
Explanation: The recovery system is responsible for the maintenance of durability. In
addition, it also ensures atomicity.
7. Which of the following systems is responsible for ensuring isolation?
a) Recovery system
b) Atomic system
c) Concurrency control system
d) Compiler system
Answer: c
Explanation: The concurrency control system is responsible for ensuring isolation in a
database system.
8. State true or false: Information residing in the volatile storage does not usually survive
system crashes
a) True
b) False
Answer: a
Explanation: Information residing in the volatile storage does not usually survive system
crashes but the information in stable storage can survive system crashes efficiently.
Answer: b
Explanation: Aborted transaction is a state after the transaction has been rolled back and
the database has been restored to the state prior to the transaction.
Answer: d
Explanation: Compensated is not a transaction state. But active, partially committed and
failed are different states of a transaction.
Answer: b
Explanation: The execution sequences in concurrency control are known as schedules.
12. The scheme that controls the interaction between executing transactions is called as
_____
a) Concurrency control scheme
b) Multiprogramming scheme
c) Serialization scheme
d) Schedule scheme
Answer: a
Explanation: The scheme that controls the interaction between executing transactions is
called as concurrency control scheme.
This set of RDBMS Question Bank focuses on “Transaction Isolation Levels”.
Answer: a
Explanation: Serializable, repeatable read, read committed and read uncommitted are the
four levels of transactions.
2. State true or false: Serializable level may allow both serializable and non-serializable
executions
a) True
b) False
Answer: a
Explanation: Serializable level generally allows only serializable executions but in some
special cases, it may also allow non-serializable execution.
3. ________ allows only committed data to be read and further requires that no other
transaction is allowed to update it between two reads of a data item by a transaction.
a) Read uncommitted
b) Serializable
c) Repeatable read
d) Read committed
Answer: c
Explanation: Repeatable read allows only committed data to be read and further requires
that no other transaction is allowed to update it between two reads of a data item by a
transaction. However, the transaction may not be serializable with respect to other
transactions.
4. ________ allows only committed data to be read, but does not require repeatable reads
a) Read uncommitted
b) Serializable
c) Repeatable read
d) Read committed
Answer: d
Explanation: Read committed allows only committed data to be read, but does not require
repeatable reads. For instance, between two reads of a data item by the transaction,
another transaction may have updated the data item and committed.
Answer: a
Explanation: Real uncommitted allows uncommitted data to be read. It is the lowest
isolation level allowed by SQL.
6. State true or false: All the isolation levels disallow dirty writes
a) True
b) False
Answer: a
Explanation: All the isolation levels above additionally disallow dirty writes, that is, they
Disallow writes to a data item that has already been written by another transaction that has
not yet committed or aborted.
Answer: a
Explanation: Timestamp is allotted when execution of a transaction begins.
8. In ___________ isolation each transaction is given its own version of the database
a) Timestamp
b) Snapshot
c) Lock based
d) All of the mentioned
Answer: b
Explanation: In snapshot isolation, each transaction is given its own version or snapshot of
the database on which it can operate.
Answer: Locking has a poor degree of concurrency. It in fact has no concurrency at all.
What is a view?
a) An brief description of the schema diagram.
b) A relation that is not a part of the schema but is a virtual relation
c) Any relation that is a part of the schema
d) A relation that is a part of the schema but which needs to be specified in every operation
made on that particular relation.
Answer: b
Explanation: A relation that is not a part of the schema but is a virtual relation is called as
view. Views improve writability as viewing the entire logical model is not feasible.
Answer: c
Explanation: We use the create view command to define a view in SQL.
3. create view studentdet
select ID, address, name
from student;
Answer: d
Explanation: immediately after specifying the name of the view, we have to write the “as”
keyword. So this query does not give any result as it is syntactically incorrect.
4. State true or false: One view can be used in the expression defining another view
a) True
b) False
Answer: a
Explanation: One view can be used to define another view in its expression. This further
improves the writability of the code as we are reducing the entire logical model.
5. If the actual relations used in the view definition change, the view is updated immediately.
Such views are called _________
a) Instant views
b) Instantaneous views
c) Materialistic views
d) Materialized views
Answer: d
Explanation: If the actual relations used in the view definition change, the view is updated
immediately. Such views are called Materialized views. Materialized views help to keep the
database up-to-date.
Answer: a
Explanation: The process of maintaining views up to date is called View maintenance. View
maintenance can be done immediately when any of the views is updated.
7. How can we insert data into a view?
a) insert into ();
b) create data values ();
c) enter ();
d) insert into values ();
Answer: d
Explanation: We can insert data into a view using the inset into values (); statement. This
operation can be done only if the view is updatable.
8. State true or false: We can update a view if it has multiple database relations in the from
clause
a) True
b) False
Answer: b
Explanation: We can update a view only if it has a single database relation in the “from”
clause.
9. The _______ statement makes the updates performed by the transaction permanent.
a) Finalize work
b) Finish work
c) Commit work
d) None of the mentioned
Answer: c
Explanation: The Commit work statement makes the updates performed by the transaction
permanent. After a transaction is committed, a new transaction is automatically started.
10. The _______ statement causes the statements to undo all the updates performed on
the transaction
a) Undo work
b) Rollback work
c) Commit work
d) Replace work
Answer: b
Explanation: The Rollback work statement causes the statements to undo all the updates
performed on the transaction. The database is then restored to the state of what it was
before the first statement of the transaction was executed.
Query optimization is a process of choosing the cheapest and efficient of several equivalent
query execution plans by using the statistics about data. A query typically has many possible
execution strategies, and the process of choosing a suitable one for processing a query is known
as query optimization.
As there are many equivalent transformations of the same high-level query, the aim of query
optimization is to choose the one that minimizes resource usage.
A query which is written by the user may not be the efficient one. Also, the query written by
the user can be transformed into several equivalent (each one producing the same result)
expressions (queries).
The cost of processing each of these equivalent expressions is different. One may be costly and
the other may be cheap.
We do not expect users to write their queries so that they can be processed efficiently. Rather,
we expect the system to construct a query-evaluation plan that minimizes the cost of query
evaluation. This is where query optimization comes into play.
Query optimization is the process of selecting the most efficient query-evaluation plan from
among the many strategies usually possible for processing a given query, especially if the
query is complex.
A transaction T that tries to execute read(Q) operation will be permitted if and only if the
timestamp(T) >= W-timestamp(Q). That is, T is permitted to execute if it is started after a
successful write on Q by some transactions.
A transaction T that tries to execute write(Q) operation will be permitted if the timestamp(T)
is greater than both the R-timestamp(Q) and W-timestamp(Q). That is, T is permitted to write
a data item which was read/write by older transactions.
Reading the value of a data item that was produced by an uncommitted transaction is referred
as dirty read problem. This will be avoided if we permit transactions to read the values that
are produced by committed transactions.
You can set the TRANSACTION ISOLATION LEVEL as READ COMMITTED. This specifies
that the statements cannot read data that has been modified but not committed by other
transaction. This prevents dirty reads.
1 Begin_transaction
2 Read(A)
3 A:=A-500;
4 Write(A);
5 Read(B)
6 B:=B+500;
7 Write(B);
8 Commit;
a) Partially committed
b) Committed
c) Aborted
d) Failed
A transaction enters into FAILED state if the transaction cannot be committed or the
transaction is aborted while in the ACTIVE state, perhaps due to the user aborting the
transaction or as a result of system failures (system crash, transaction errors, disk failures
etc.) or as a result of the concurrency control protocol aborting the transaction to ensure
serializability.
The transaction at FAILED state is rolled back to undo the changes made to the data
items and ABORTED.
Transaction states
Failed - if a transaction is not able to proceed for various reasons (refer above)
1 Begin_transaction
2 Read(A)
3 A:=A-500;
4 Write(A);
5 Read(B)
6 B:=B+500;
7 Write(B);
8 Commit;
a) Active, Partially committed
b) Partially committed, Committed
c) Active, Failed
d) Partially committed, Failed
At this point, it may be found that the transaction has stopped due to system failure and any
updates made to the data items by the transaction may not have been safely recorded on
secondary storage. Or the transaction might have violated serializability or an integrity
constraint and the transaction has to be aborted. In such cases, the transaction would go into
the FAILED state.
The transaction at FAILED state is rolled back to undo the changes made to the data items
and ABORTED.
Transaction states
Failed - if a transaction is not able to proceed for various reasons (refer above)
Answer: (a) Improved transaction throughput and (d) Reduced waiting time
Reduced waiting time – the short transaction need not wait for the longer ones to complete if
they are permitted to execute concurrently.
When we permit multiple transactions to work simultaneously, smaller transactions need not
wait for the longer one to finish. [Smaller transactions may have to wait for longer one to
finish if we permit them to execute serially, ie, one after the other]
ACID properties are the desirable properties that any transaction should possess in a
relational database management system. These properties help in safeguarding the
integrity of the data.
While executing a transaction, the most desirable property is to execute all the instructions of
the given transaction or execute none (if executed few, roll them back). This property helps to
avoid inconsistencies caused by an incomplete transaction. Atomicity is the property which
ensures this.
ACID properties are the desirable properties that any transaction should possess in a
relational database management system. These properties help in safeguarding the integrity
of the data.
Transactions that use either strict or rigorous 2PL protocols delay releasing the EXCLUSIVE
locks on their data items until the transaction commits. Hence, other
concurrent transactions cannot consume the data items that were modified by
the transactions under strict or rigorous 2PL until the later release the locks.
Example: Suppose T1 and T2 are two concurrent transactions. If T1 writes a data item A and
T1 not yet committed. Now, T2 reads the value of A which was just modified by T1. This is
uncommitted read / dirty read. At this time, if for some reason T1 decides to rollback or abort.
This forces T2 to rollback because, T2 used the data produced by T1.
T1 T2
Begin_transaction
Begin_transaction
Read(A)
Read(A)
Read(B)
Read(B)
Commit;
Commit;
a) Serializable
b) Repeatable read
c) Read committed
d) All of the above
The given schedule consists of transactions that are read-only. Hence, the above sequence of
operations can occur at all levels of isolation since the transactions only read data without
writing.
Dirty read is the one where a transaction consumes a data item that was updated by
another ongoing not-yet-committed transaction. In this question, no WRITE
operation is involved.
In the question, the schedule does not have any WRITE operations. So, dirty reads are not
possible. For this reason, SERIALIZABLE, REPEATABLE READ and READ COMMITTED
isolation levels permit the given schedule.
2. A lock that allows concurrent transactions to access different rows of the same table is
known as a
a) Database-level lock
b) Table-level lock
c) Page-level lock
d) Row-level lock
View Answer
Answer: d
Explanation: Locks are used to maintain database consistency.
3. Which of the following are introduced to reduce the overheads caused by the log-based
recovery?
a) Checkpoints
b) Indices
c) Deadlocks
d) Locks
View Answer
Answer: a
Explanation: Checkpoints are introduced to reduce overheads caused by the log-based
recovery.
4. Which of the following protocols ensures conflict serializability and safety from
deadlocks?
a) Two-phase locking protocol
b) Time-stamp ordering protocol
c) Graph based protocol
d) None of the mentioned
View Answer
Answer: b
Explanation: Time-stamp ordering protocol ensures conflict serializability and safety from
deadlocks.
5. Which of the following is the block that is not permitted to be written back to the disk?
a) Dead code
b) Read only
c) Pinned
d) Zapped
View Answer
Answer: c
Explanation: A block that is not permitted to be written back to the disk is called pinned.
6. If transaction Ti gets an explicit lock on the file Fc in exclusive mode, then it has an -
__________ on all the records belonging to that file.
a) Explicit lock in exclusive mode
b) Implicit lock in shared mode
c) Explicit lock in shared mode
d) Implicit lock in exclusive mode
View Answer
Answer: d
Explanation: If transaction Ti gets an explicit lock on the file Fc in exclusive mode, then it
has an implicit lock in exclusive mode on all the records belonging to that file.
7. Which refers to a property of computer to run several operation simultaneously and
possible as computers await response of each other
a) Concurrency
b) Deadlock
c) Backup
d) Recovery
View Answer
Answer: a
Explanation: Concurrency is a property of systems in which several computations are
executing simultaneously, and potentially interacting with each other.
8. All lock information is managed by a __________ which is responsible for assigning and
policing the locks used by the transactions.
a) Scheduler
b) DBMS
c) Lock manager
d) Locking agent
View Answer
Answer: c
Explanation: A distributed lock manager (DLM) provides distributed software applications
with a means to synchronize their accesses to shared resources.
9. The ____ lock allows concurrent transactions to access the same row as long as they
require the use of different fields within that row.
a) Table-level
b) Page-level
c) Row-level
d) Field-level
View Answer
Answer: d
Explanation: Lock is limited to the attributes of the relation.
10. Which of the following is a procedure for acquiring the necessary locks for a transaction
where all necessary locks are acquired before any are released?
a) Record controller
b) Exclusive lock
c) Authorization rule
d) Two phase lock
View Answer
Answer: d
Explanation: Two-phase lock is a procedure for acquiring the necessary locks for a
transaction where all necessary locks are acquired before any are released.
. A system is in a ______ state if there exists a set of transactions such that every
transaction in the set is waiting for another transaction in the set.
a) Idle
b) Waiting
c) Deadlock
d) Ready
View Answer
Answer: c
Explanation: When one data item is waiting for another data item in a transaction then
system is in deadlock.
2. The deadlock state can be changed back to stable state by using _____________
statement.
a) Commit
b) Rollback
c) Savepoint
d) Deadlock
View Answer
Answer: b
Explanation: Rollback is used to rollback to the point before lock is obtained.
4. When transaction Ti requests a data item currently held by Tj, Ti is allowed to wait only if
it has a timestamp smaller than that of Tj (that is, Ti is older than Tj). Otherwise, Ti is rolled
back (dies). This is
a) Wait-die
b) Wait-wound
c) Wound-wait
d) Wait
View Answer
Answer: a
Explanation: The wait–die scheme is a non-preemptive technique.
5. When transaction Ti requests a data item currently held by Tj, Ti is allowed to wait only if
it has a timestamp larger than that of Tj (that is, Ti is younger than Tj ). Otherwise, Tj is
rolled back (Tj is wounded by Ti). This is
a) Wait-die
b) Wait-wound
c) Wound-wait
d) Wait
View Answer
Answer: c
Explanation: The wound–wait scheme is a preemptive technique. It is a counterpart to the
wait–die scheme.
6. The situation where the lock waits only for a specified amount of time for another lock to
be released is
a) Lock timeout
b) Wait-wound
c) Timeout
d) Wait
View Answer
Answer: a
Explanation: The timeout scheme is particularly easy to implement, and works well if
transactions are short and if longwaits are likely to be due to deadlocks.
7. The deadlock in a set of a transaction can be determined by
a) Read-only graph
b) Wait graph
c) Wait-for graph
d) All of the mentioned
View Answer
Answer: a
Explanation: Each transaction involved in the cycle is said to be deadlocked.
8. A deadlock exists in the system if and only if the wait-for graph contains a ___________
a) Cycle
b) Direction
c) Bi-direction
d) Rotation
View Answer
Answer: a
Explanation: Each transaction involved in the cycle is said to be deadlocked.
9. Selecting the victim to be rollbacked to the previous state is determined by the minimum
cost. The factors determining cost of rollback is
a) How long the transaction has computed, and how much longer the transaction will
compute before it completes its designated task
b) How many data items the transaction has used
c) How many more data items the transaction needs for it to complete
d) All of the mentioned
View Answer
Answer: d
Explanation: We should roll back those transactions that will incur the minimum cost.
10. __________ rollback requires the system to maintain additional information about the
state of all the running transactions.
a) Total
b) Partial
c) Time
d) Commit
View Answer
Answer: b
Explanation: In total rollback abort the transaction and then restart it.
3. If a node is locked in an intention mode, explicit locking is done at a lower level of the
tree. This is called
a) Intention lock modes
b) Explicit lock
c) Implicit lock
d) Exclusive lock
View Answer
Answer: a
Explanation: There is an intention mode associated with shared mode, and there is one with
an exclusive mode.
4. If a node is locked in __________ explicit locking is being done at a lower level of the
tree, but with only shared-mode locks.
a) Intention lock modes
b) Intention-shared-exclusive mode
c) Intention-exclusive (IX) mode
d) Intention-shared (IS) mode
View Answer
Answer: a
Explanation: There is an intention mode associated with shared mode, and there is one with
an exclusive mode.
5. If a node is locked in ____________ then explicit locking is being done at a lower level,
with exclusive-mode or shared-mode locks.
a) Intention lock modes
b) Intention-shared-exclusive mode
c) Intention-exclusive (IX) mode
d) Intention-shared (IS) mode
View Answer
Answer: c
Explanation: There is an intention mode associated with shared mode, and there is one with
an exclusive mode.
6. If a node is locked in ______________ the subtree rooted by that node is locked explicitly
in shared mode, and that explicit locking is being done at a lower level with exclusive-mode
locks.
a) Intention lock modes
b) shared and intention-exclusive (SIX) mode
c) Intention-exclusive (IX) mode
d) Intention-shared (IS) mode
View Answer
Answer: b
Explanation: There is an intention mode associated with shared mode, and there is one with
an exclusive mode.
7. ____________ denotes the largest timestamp of any transaction that executed write(Q)
successfully.
a) W-timestamp(Q)
b) R-timestamp(Q)
c) RW-timestamp(Q)
d) WR-timestamp(Q)
View Answer
Answer: a
Explanation: The most common method for doing ordering transaction is to use a
timestamp-ordering scheme.
8. The _____________ ensures that any conflicting read and write operations are executed
in timestamp order.
a) Timestamp-ordering protocol
b) Timestamp protocol
c) W-timestamp
d) R-timestamp
View Answer
Answer: a
Explanation: The most common method for doing ordering transaction is to use a
timestamp-ordering scheme.
9. The __________ requires that each transaction Ti executes in two or three different
phases in its lifetime, depending on whether it is a read-only or an update transaction.
a) Validation protocol
b) Validation-based protocol
c) Timestamp protocol
d) Timestamp-ordering protocol
View Answer
Answer: a
Explanation: A concurrency-control scheme imposes the overhead of code execution and
possible delay of transactions. It may be better to use an alternative scheme that imposes
less overhead.
10. This validation scheme is called the _________ scheme since transactions execute
optimistically, assuming they will be able to finish execution and validate at the end.
a) Validation protocol
b) Validation-based protocol
c) Timestamp protocol
d) Optimistic concurrency-control
View Answer
Answer: a
Explanation: A concurrency-control scheme imposes the overhead of code execution and
possible delay of transactions. It may be better to use an alternative scheme that imposes
less overhead.
. The most recent version of standard SQL prescribed by the American National Standards
Institute is
a) SQL 2016
b) SQL 2002
c) SQL – 4
d) SQL2
View Answer
Answer: a
Explanation: SQL-2016 is the most recent version of standard SQL prescribed by the ANSI.
2. ANSI-standard SQL allows the use of special operators in conjunction with the WHERE
clause. A special operator used to check whether an attribute value is null is
a) BETWEEN
b) IS NULL
c) LIKE
d) IN
View Answer
Answer: b
Explanation: Exists is used to check whether an attribute value is null or not in conjunction
with the where clause.
3. A lock that prevents the use of any tables in the database from one transaction while
another transaction is being processed is called a
a) Database-level lock
b) Table-level lock
c) Page-level lock
d) Row-level lock
View Answer
Answer: a
Explanation: Data base-level lock prevents the use of any tables in the data base from one
transaction while another transaction is being processed.
4. A condition that occurs when two transactions wait for each other to unlock data is known
as a(n)
a) Shared lock
b) Exclusive lock
c) Binary lock
d) Deadlock
View Answer
Answer: d
Explanation: Deadlock occurs when two transactions wait for each other to unlock data.
5. _______ means that data used during the execution of a transaction cannot be used by a
second transaction until the first one is completed.
a) Serializability
b) Atomicity
c) Isolation
d) Time stamping
View Answer
Answer: c
Explanation: Isolation means that data used during the execution of a transaction can’t be
used by a second transaction until the first one is completed.
7. The file organization which allows us to read records that would satisfy the join condition
by using one block read is
a) Heap file organization
b) Sequential file organization
c) Clustering file organization
d) Hash files organization
View Answer
Answer: c
Explanation: Clustering file organization allows us to read records that would satisfy the join
condition by using one block read.
9. The extent of the database resource that is included with each lock is called the level of
a) Impact
b) Granularity
c) Management
d) DBMS control
View Answer
Answer: b
Explanation: The extent of the data base resource that is included with each lock is called
the level of Granularity.
10. DBMS periodically suspends all processing and synchronizes its files and journals
through the use of
a) Checkpoint facility
b) Backup facility
c) Recovery manager
d) Database change log
View Answer
Answer: a
Explanation: DBMS periodically suspends all processing and synchronizes its files and
journals through the use of Check point facility.
4. The system has entered an undesirable state (for example, deadlock), as a result of
which a transaction cannot continue with its normal execution. This is
a) Read error
b) Boot error
c) Logical error
d) System error
View Answer
Answer: c
Explanation: The transaction, can be re-executed at a later time.
5. The transaction can no longer continue with its normal execution because of some
internal condition, such as bad input, data not found, overflow, or resource limit exceeded.
This is
a) Read error
b) Boot error
c) Logical error
d) System error
View Answer
Answer: c
Explanation: The transaction, can be re-executed at a later time.
6. The assumption that hardware errors and bugs in the software bring the system to a halt,
but do not corrupt the nonvolatile storage contents, is known as the
a) Stop assumption
b) Fail assumption
c) Halt assumption
d) Fail-stop assumption
View Answer
Answer: d
Explanation: Well-designed systems have numerous internal checks, at the hardware and
the software level, that bring the system to a halt when there is an error. Hence, the fail-stop
assumption is a reasonable one.
7. Which kind of failure loses its data in head crash or failure during a transfer operation.
a) Transaction failure
b) System crash
c) Disk failure
d) All of the mentioned
View Answer
Answer: c
Explanation: Copies of the data on other disks, or archival backups on tertiary media, such
as DVD or tapes, are used to recover from the failure.
8. The failure occurred sufficiently early during the transfer that the destination block
remains intact.
a) Partial Failure
b) Total failure
c) Successful completion
d) Data transfer failure
View Answer
Answer: a
Explanation: Copies of the data on other disks, or archival backups on tertiary media, such
as DVD or tapes, are used to recover from the failure.
9. The database is partitioned into fixed-length storage units called
a) Parts
b) Blocks
c) Reads
d) Build
View Answer
Answer: b
Explanation: Blocks are the units of data transfer to and from disk, and may contain several
data items.
10. Which of the following causes system to crash
a) Bug in software
b) Loss of volatile data
c) Hardware malfunction
d) All of the mentioned
View Answer
Answer: d
Explanation: The content of non-volatile storage remains intact, and is not corrupted.
1. The log is a sequence of _________ recording all the update activities in the database.
a) Log records
b) Records
c) Entries
d) Redo
View Answer
Answer: a
Explanation: The most widely used structure for recording database modifications is the log.
2. 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
View Answer
Answer: a
Explanation: If at any point the transaction has to be aborted, the system merely deletes the
new copy. The old copy of the database has not been affected.
3. 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
View Answer
Answer: b
Explanation: Any page which is not updated by a transaction is not copied, but instead the
new page table just stores a pointer to the original page.
4. The current copy of the database is identified by a pointer, called ____________ which is
stored on disk.
a) Db-pointer
b) Update log
c) Update log records
d) All of the mentioned
View Answer
Answer: a
Explanation: Any page which is not updated by a transaction is not copied, but instead the
new page table just stores a pointer to the original page.
5. If a transaction does not modify the database until it has committed, it is said to use the
___________ technique.
a) Deferred-modification
b) Late-modification
c) Immediate-modification
d) Undo
View Answer
Answer: a
Explanation: Deferred modification has the overhead that transactions need to make local
copies of all updated data items; further, if a transaction reads a data item that it has
updated, it must read the value from its local copy.
7. ____________ using a log record sets the data item specified in the log record to the old
value.
a) Deferred-modification
b) Late-modification
c) Immediate-modification
d) Undo
View Answer
Answer: d
Explanation: Undo brings the previous contents.
8. In the __________ phase, the system replays updates of all transactions by scanning the
log forward from the last checkpoint.
a) Repeating
b) Redo
c) Replay
d) Undo
View Answer
Answer: b
Explanation: Undo brings the previous contents.
9. The actions which are played in the order while recording it is called ______________
history.
a) Repeating
b) Redo
c) Replay
d) Undo
View Answer
Answer: a
Explanation: Undo brings the previous contents.
10. A special redo-only log record < Ti, Xj, V1> is written to the log, where V1 is the value
being restored to data item Xj during the rollback. These log records are sometimes called
a) Log records
b) Records
c) Compensation log records
d) Compensation redo records
View Answer
Answer: c
Explanation: Such records do not need undo information since we never need to undo such
an undo operation.
In order to reduce the overhead in retrieving the records from the storage space we use
a) Logs
b) Log buffer
c) Medieval space
d) Lower records
View Answer
Answer: b
Explanation: The output to stable storage is in units of blocks.
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on
“Buffer Management”.
1. In order to reduce the overhead in retrieving the records from the storage space we
use
a) Logs
b) Log buffer
c) Medieval space
d) Lower records
View Answer
Answer: b
Explanation: The output to stable storage is in units of blocks.
2. The order of log records in the stable storage ____________ as the order in which
they were written to the log buffer.
a) Must be exactly the same
b) Can be different
c) Is opposite
d) Can be partially same
View Answer
Answer: a
Explanation: As a result of log buffering, a log record may reside in only main
memory (volatile storage) for a considerable time before it is output to stable
storage.
3. Before a block of data in main memory can be output to the database, all log
records pertaining to data in that block must have been output to stable storage. This is
a) Read-write logging
b) Read-ahead logging
c) Write-ahead logging
d) None of the mentioned
View Answer
Answer: c
Explanation: The WAL rule requires only that the undo information in the log has
been output to stable storage, and it permits the redo information to be written
later.
Answer: d
Explanation: If there are insufficient log records to fill the block, all log records in
main memory are combined into a partially full block and are output to stable
storage.
Answer: b
Explanation: No-force policy allows faster commit of transactions.
6. ______________ policy allows multiple updates to accumulate on a block before it
is output to stable storage, which can reduce the number of output operations greatly
for frequently updated blocks.
a) Force
b) No-force
c) Steal
d) No-steal
View Answer
Answer: b
Explanation: No-force policy allows faster commit of transactions.
7. The ___________ policy, allows the system to write modified blocks to disk even if
the transactions that made those modifications have not all committed.
a) Force
b) No-force
c) Steal
d) No-steal
View Answer
Answer: c
Explanation: The no-steal policy does not work with transactions that perform a large
number of updates.
Answer: a
Explanation: These locks, and other similar locks that are held for a short duration.
9. The __________________ contains a list of blocks that have been updated in the
database buffer.
a) Latches
b) Swap Space
c) Dirty Block
d) None of the mentioned
View Answer
Answer: c
Explanation: Dirty blocks are those that have been updated in memory, and the disk
version is not up-to-date.
10. The operating system reserves space on disk for storing virtual-memory pages that
are not currently in main memory; this space is called
a) Latches
b) Swap Space
c) Dirty Block
d) None of the mentioned
View Answer
Answer: b
Explanation: Almost all current-generation operating systems retain complete
control of virtual memory.
Which of the following refers to the problem of finding abstracted patterns (or structures) in
the unlabeled data?
a. Supervised learning
b. Unsupervised learning
c. Hybrid learning
d. Reinforcement learning
Answer: b
2) Which one of the following refers to querying the unstructured textual data?
a. Information access
b. Information update
c. Information retrieval
d. Information manipulation
3) Which of the following can be considered as the correct process of Data Mining?
Answer: a
Explanation: The process of data mining contains many sub-processes in a specific order.
The correct order in which all sub-processes of data mining executes is Infrastructure,
Exploration, Analysis, Interpretation, and Exploitation.
4) Which of the following is an essential process in which the intelligent methods are applied
to extract data patterns?
a. Warehousing
b. Data Mining
c. Text Mining
d. Data Selection
Answer: b
Explanation: Data mining is a type of process in which several intelligent methods are
used to extract meaningful data from the huge collection ( or set) of data.
Answer: a
Explanation: The term KDD or Knowledge Discovery Database is refers to a broad process
of discovering the knowledge in the data and emphasizes the high-level applications of
specific Data Mining techniques as well.
8) The ………. consists of the various applications and database that play a role in a backup and
recovery strategy.
A. Recovery Manager environment
B. Recovery Manager suit
C. Recovery Manager file
D. Recovery Manager database
9) In which the database can be restored up to the last consistent state after the system
failure?
A. Backup
B. Recovery
C. Both
D. None
10) A ……….. is a block of Recovery Manager(RMAN) job commands that is stored in the
recovery catalog.
A. recovery procedure
B. recovery block
C. stored block
D. stored script
Table of Contents
READ ALSO: MCQ ON DISTRIBUTED DATABASE TRANSACTION
MANAGEMENT
11) In log based recovery, the log is sequence of ………
A. filter
B. records
C. blocks
D. numbers
14) Most backup and recovery commands in ……….. are executed by server sessions.
A. Backup Manager
B. Recovery Manager
C. Backup and Recovery Manager
D. Database Manager
15) …….. systems typically allows to replace failed disks without stopping access to the system.
A. RAM
B. RMAN
C. RAD
D. RAID
16) An ……… is an exact copy of a single data-file, archived redo log file, or control file.
A. image copy
B. data file copy
C. copy log
D. control copy
18) The remote backup site is sometimes called the ………. site.
A. primary
B. secondary
C. ternary
D. None of the above
20) The simplest approach to introducing redundancy is to duplicate every disk is called …..
A. mirroring
B. imaging
C. copying
D. All of the above
ANSWERS:
1) C. Two-phase commit
2) A. Recovery measures
3) D. failure recovery
4) C. Security
5) A. disk errors
6) D. Scalability
7) C. system recovery
8) A. Recovery Manager environment
9) B. Recovery
10) D. stored script
11) B. records
12) B. registration
13) B. Shadow paging
14) B. Recovery Manager
15) D. RAID
16) A. image copy
17) B. RAID level 2
18) B. secondary
19) A. to take Backup of the Oracle Database
20) A. mirroring
DBMS Question Bank
Sr. No Question Answer
(A) DDL
(B) DML
(C) DCL
1 (D) TCL D
(A) Rows
(B) Tables
(C) Attributes
2 (D) Tuples B
(A) Attributes
(A) Relational
(B) Hierarchical
(C) Network
7 (D) Transition D
The most commonly used operation in relational algebra for projecting a set
of tuple from a relation is
(A) Union
(B) Select
(C) Projection
8 (D)
TheJoin
_____ operation allows the combining of two relations by merging pairs B
of tubles, one from each relation, into a single tuple.
(A) Intersection
(B) Union
9 C
A _____ is an abstract model that describes how the data are organised and
represented.
(A) Database
(B) Schema
(C) Instances
(A) Table
(B) Tools
(C) Format
Relational Algebra is
A. Data Definition Language
B. Meta Language
C. Procedural query Language
39 D. None of the above C
Relational calculus is a
A. Procedural language
B. Non-Procedural language
C. Data definition language
40 D. High level language B
E-R model uses this symbol to represent the weak entity set?
A. Dotted rectangle
B. Diamond
C. Doubly outlined rectangle
41 D. None of these C
The system must create a query ____ plan before it can fully evaluate a query.
A) Optimization B) Parser
48 C) Translation D) Evaluation D
The concept whichchecks the syntax of query which is written according to
rules of the grammer is classified as
a) Query graph b) Query tree
49 c) Parser d) Scanner c
The system must create a query ____ plan before it can fully evaluate a query.
a) Optimization b) Parser
52 c) Translation d) Evaluation d
Collections of operations that form a single logical unit of work are called
__________?
a) Views b) Networks
53 c) Units d) Transactions d
a)Commit
b)Rollback
c)Savepoint
d)Deadlock
63 b
Which of the following contains a complete record of all activity that affected
the contents of a database during a certain period of time?
a)report writer
b)query language
d)transaction log
64 d
What is/are the step(s) involved in fetching the data from the database in
query processing?
a)Parsing and translation b) Optimization
67 c) Evaluation d) All of the above d
In case of any shut down during transaction before commit which of the
following statement is done automatically ?
a) View b)Commit
75 c) Rollback d) Flashback c
What is ACID properties of Transactions?
a)Atomicity, Consistency, Isolation, Database
b)Atomicity, Consistency, Isolation, Durability
c)Atomicity, Consistency, Inconsistent, Durability
d)Automatically, Concurrency, Isolation, Durability
76 b
a)Atomicity
b)Simplicity
83 b
X is read from a database and stored in a buffer in main memory with the ___
operation.
A. Read
B. Write
C. Commit
84 D. Rollback A
When dealing with database transactions, there is often a need for multiple
users to use a database to perform different operations. In this case, ___ of
the database occurs.
A. Concurrent Connection
B. Concurrent Reduction
C. Concurrent Execution
93 D. Concurrent Revolution C
During simultaneous execution, each operation should be performed
interleaved with the others, ensuring that there is no interference with the
other operations. This maintains a database ___.
A. Consistency
B. Redundancy
C. Concurrency
94 D. None C
What is TRUE about Durability?
A. The failure of the system or an error in a transaction cannot cause them to
be lost.
B. A consistent state is reached when a transaction is completed.
C. System failures cannot lead to the loss of that consistent state.
95 D. All of the above D
The concurrency ___ allows us to maintain the concurrency of the database.
A. Protocols
B. Controls
C. Control Protocols
96 D. None C