100% found this document useful (2 votes)
6K views25 pages

4 MCQ DBMS

The document discusses database transactions and query processing. Key points: 1. Collections of operations that form a single logical unit of work are called transactions. Transactions have the properties of atomicity, consistency, isolation, and durability (ACID). 2. Concurrency control schemes like locking and timestamps are used to manage transaction execution and preserve consistency. Locking involves granting locks to transactions to control access to data. 3. Query processing involves parsing, optimization, and evaluation of queries. Optimization determines the most efficient execution plan. Evaluation executes the plan through primitive operations like sorting.

Uploaded by

Rutuja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
6K views25 pages

4 MCQ DBMS

The document discusses database transactions and query processing. Key points: 1. Collections of operations that form a single logical unit of work are called transactions. Transactions have the properties of atomicity, consistency, isolation, and durability (ACID). 2. Concurrency control schemes like locking and timestamps are used to manage transaction execution and preserve consistency. Locking involves granting locks to transactions to control access to data. 3. Query processing involves parsing, optimization, and evaluation of queries. Optimization determines the most efficient execution plan. Evaluation executes the plan through primitive operations like sorting.

Uploaded by

Rutuja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Database Transactions and Query Processing

1. Collections of operations that form a single logical unit of work are called __________

a) Views

b) Networks

c) Units

d) Transactions

2. The “all-or-none” property is commonly referred to as _________

a) Isolation

b) Durability

c) Atomicity

d) None of the mentioned

3. Which of the following is a property of transactions?

a) Atomicity

b) Durability

c) Isolation

d) All of the mentioned

4. Execution of translation in isolation preserves the _________ of a database

a) Atomicity

b) Consistency

c) Durability

d) All of the mentioned


5. Which of the following systems is responsible for ensuring durability?

a) Recovery system

b) Atomic system

c) Concurrency control system

d) Compiler system

6. Which of the following is not a transaction state?

a) Active

b) Partially committed

c) Failed

d) Compensated

7. The execution sequences in concurrency control are termed as ________

a) Serials

b) Schedules

c) Organizations

d) Time tables

8. 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
9. The deadlock in a set of transaction can be determined by

a. Read-only graph

b. Wait graph

c. Wait-for graph

d. All of the mentioned

10 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

11 __________ rollback requires the system to maintain additional information about the state of all
the running transactions.

a. Total

b. Partial

c. Time

d. Commit

12. A transaction for which all committed changes are permanent is called:

a. atomic

b. consistent

c. isolated

d. durable
13. In this instance, dirty reads are disallowed, while nonrepeatable reads and phantom reads are
allowed.

a. Read committed

b. Read uncommitted

c. Repeatable read

d. Serializable

14. A transaction may not always complete its execution successfully. Such a transaction is termed

a. Aborted

b. Terminated

c. Closed

d. All of the mentioned

15. Transaction management ensures ____________ and __________ properties.

a. Atomicity and Intigrity

b. Atomicity and Durability

c. Atomicity and Abstraction

d. None of these

16. ____________ is an interface between low level database and application program.

a. Database Associator

b. Database Server

c. Database Manage

d. None of these
17. Who detects the failure of the system and restore the database to consistent state ?

a. Database Administrator

b. Application Programmer

c. Naive User

d. Storage Manager

18. Which of the following is the preferred way to recover a database after a transaction in progress
terminates abnormally?

a. Rollback

b. Rollforward

c. Switch to duplicate database

d. Reprocess transactions

19. Which of the following is the preferred way to recover a database after a system failure?

a. Rollback

b. Rollforward

c. Switch to duplicate database

d. Reprocess transactions

20. A shared lock allows which of the following types of transactions to occur?

a. Delete

b. Insert

c. Read

d. Update
21. A transaction that performs only one operation is called as a _________

a) Partial schedule

b) Complete schedule

c) Dependent schedule

d) Independent schedule

22. The phenomenon in which one failure leads to a series of transaction rollbacks is called as
________

a) Cascading rollback

b) Cascadeless rollback

c) Cascade cause

d) None of the mentioned

23. State true or false: Every cascadeless schedule is also recoverable

a) True

b) False

24. Which of the following are the advantages of transaction concurrency?

a) Increased throughput

b) Increased utilization

c) Reduces average response time

d) All of the mentioned

25. If a schedule is equivalent to a serial schedule, it is called as a _________

a) Serializable schedule

b) Equivalent schedule

c) Committed schedule

d) None of the mentioned


26. Which of the following is not a type of a schedule?

a) Partial schedule

b) Dependent schedule

c) Recoverable schedule

d) None of the mentioned

27. If a transaction has obtained a __________ lock, it can read but cannot write on the item

a) Shared mode

b) Exclusive mode

c) Read only mode

d) Write only mode

28. A transaction can proceed only after the concurrency control manager ________ the lock to the
transaction

a) Grants

b) Requests

c) Allocates

d) None of the mentioned

29. The situation where no transaction can proceed with normal execution is known as ________

a) Road block

b) Deadlock

c) Execution halt

d) Abortion
30. The log is a sequence of _________ recording all the update activities in the database.

a) Log records

b) Records

c) Entries

d) Redo

31. 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

32. 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

33. 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
34.Which of the following is not a recovery technique?

a.Deferred update

b.Immediate update

c.Two-phase commit

d.Recovery management

35.Checkpoints are a part of

a.Recovery measures

b.Security measures

c.Concurrency measures

d.Authorization measures

36. ....... deals with soft errors, such as power failures.

a. system recovery

b. media recovery

c. database recovery

d. failure recovery

37. Which commands are used to control which users have which privilege over which objects ?

a. QUE and QUIST

b. GRANT and REVOKE

c. CASECADE and MVD

d. None of the above


38. Which of the following are steps in query processing?

a) Parsing and translation

b) Optimization

c) Evaluation

d) All of the mentioned

39. A sequence of primitive operations that can be used to evaluate a query are called as
__________

a) Query evaluation algebra

b) Query evaluation plan

c) Query evaluation primitive

d) Query evaluation engine

40. Sorting of relations that do not fit in memory is called as _______

a) Internal sorting

b) External sorting

c) Overflow sorting

d) Overload sorting

41. A system is in a _______ state if there exists a set of transactions in which every transaction is
waiting for another transaction in the set.

a) Deadlock

b) Starved

c) Isolated

d) None of the mentioned


42. Which of the following is not a method in deadlock handling

a) Deadlock prevention

b) Deadlock detection

c) Deadlock recovery

d) Deadlock distribution

43. Deadlocks can be prevented using

a) Preemption and transaction rollbacks

b) Wait and die scheme

c) Wound-wait scheme

d) All of the mentioned

44. State true or false: Wait die scheme is a non-preemptive technique

a) True

b) False

45. Lock timeouts have which of the following advantages?

a) Unnecessary rollbacks do not occur

b) Transactions do not starve

c) It is easy to implement

d) All of the mentioned

46. The _________ graph describes deadlocks precisely

a) Wound wait graph

b) Wait die graph

c) Wait for graph

d) None of the mentioned


47. How do we generally recover from a deadlock?

a) By aborting all the transactions

b) By rolling back all the transactions

c) By rolling back only a selected number of transactions

d) None of the mentioned

48. State true or false: Partial rollback is not possible.

a) True

b) False

49. Which of the following steps must be taken while choosing a victim?

a) Avoiding starvation

b) Number of transactions involved in rollback

c) Data items used by the transaction

d) All of the mentioned

50. Which of the following cannot be used to implement a timestamp

a) System clock

b) Logical counter

c) External time counter

d) None of the mentioned


51. A logical counter is _________ after a new timestamp has been assigned

a) Incremented

b) Decremented

c) Doubled

d) Remains the same

52. W-timestamp(Q) denotes?

a) The largest timestamp of any transaction that can execute write(Q) successfully

b) The largest timestamp of any transaction that can execute read(Q) successfully

c) The smallest timestamp of any transaction that can execute write(Q) successfully

d) The smallest timestamp of any transaction that can execute read(Q) successfully

53. R-timestamp(Q) denotes?

a) The largest timestamp of any transaction that can execute write(Q) successfully

b) The largest timestamp of any transaction that can execute read(Q) successfully

c) The smallest timestamp of any transaction that can execute write(Q) successfully

d) The smallest timestamp of any transaction that can execute read(Q) successfully

54. A ________ ensures that any conflicting read and write operations are executed in timestamp
order

a) Organizational protocol

b) Timestamp ordering protocol

c) Timestamp execution protocol

d) 802-11 protocol
55. The default timestamp ordering protocol generates schedules that are

a) Recoverable

b) Non-recoverable

c) Starving

d) None of the mentioned

56. State true or false: The Thomas write rule has a greater potential concurrency than the
timestamp ordering protocol

a) True

b) False

57. Which of the following timestamp based protocols generates serializable schedules?

a) Thomas write rule

b) Timestamp ordering protocol

c) Validation protocol

d) None of the mentioned

58. In timestamp ordering protocol, suppose that the transaction Ti issues read(Q) and TS(Ti)<W-
timestamp(Q), then

a) Read operation is executed

b) Read operation is rejected

c) Write operation is executed

d) Write operation is rejected


59. In timestamp ordering protocol, suppose that the transaction Ti issues write(Q) and TS(Ti)<W-
timestamp(Q), then

a) Read operation is executed

b) Read operation is rejected

c) Write operation is executed

d) Write operation is rejected

60. _______________ 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

61. ___________ combines the data manipulating power of SQL with the data processing power of
Procedural languages.

a) PL/SQL

b) SQL

c) Advanced SQL

d) PQL

62. _______________ has made PL/SQL code run faster without requiring any additional work on
the part of the programmer.

a) SQL Server

b) My SQL

c) Oracle

d) SQL Lite
63. A line of PL/SQL text contains groups of characters known as

a) Lexical Units

b) Literals

c) Textual Units

d) Identifiers

64. We use ______________ name PL/SQL program objects and units.

a) Lexical Units

b) Literals

c) Delimiters

d) Identifiers

65. A ___________________ is an explicit numeric, character, string or Boolean value not


represented by an identifier.

a) Comments

b) Literals

c) Delimiters

d) Identifiers.

66. If no header is specified, the block is said to be an _______________ PL/SQL block.

a) Strong

b) Weak

c) Empty

d) Anonymous
67. _________________ is a sequence of zero or more characters enclosed by single quotes.

a) Integers literal

b) String literal

c) String units

d) String label

68. In _______________ the management of the password for the account can be handled outside
of oracle such as operating system.

a) Database Authentication

b) Operating System Authentication

c) Internal Authentication

d) External Authentication

69. In ________________ of Oracle, the database administrator creates a user account in the
database for each user who needs access.

a) Database Authentication

b) Operating System Authentication

c) Internal Authentication

d) External Authentication

70. Consider money is transferred from (1)account-A to account-B and (2) account-B to account-A.
Which of the following form a transaction?

a) Only 1

b) Only 2

c) Both 1 and 2 individually

d) Either 1 or 2
71. A transaction is delimited by statements (or function calls) of the form __________

a) Begin transaction and end transaction

b) Start transaction and stop transaction

c) Get transaction and post transaction

d) Read transaction and write transaction

72. Identify the characteristics of transactions

a) Atomicity

b) Durability

c) Isolation

d) All of the mentioned

73. Which of the following has “all-or-none” property?

a) Atomicity

b) Durability

c) Isolation

d) All of the mentioned

74. The database system must take special actions to ensure that transactions operate properly
without interference from concurrently executing database statements. This property is referred to
as

a) Atomicity

b) Durability

c) Isolation

d) All of the mentioned


75. The property of a transaction that persists all the crashes is

a) Atomicity

b) Durability

c) Isolation

d) All of the mentioned

76. __________ states that only valid data will be written to the database.

a) Consistency

b) Atomicity

c) Durability

d) Isolation

77. Transaction processing is associated with everything below except

a) Producing detail summary or exception reports

b) Recording a business activity

c) Confirming an action or triggering a response

d) Maintaining a data

78. The Oracle RDBMS uses the ____ statement to declare a new transaction start and its properties.

a) BEGIN

b) SET TRANSACTION

c) BEGIN TRANSACTION

d) COMMIT
79. ____ means that the data used during the execution of a transaction cannot be used by a second
transaction until the first one is completed.

a) Consistency

b) Atomicity

c) Durability

d) Isolation

80. The most widely used structure for recording database modification is called as _______

a) Log

b) List

c) Queue

d) Stack

81. An update log record describes a ________ database write

a) Single

b) Double

c) Triple

d) Quadruple

82. Which of the following fields does the update log record have?

a) Transaction identifier

b) Data-item identifier

c) Old value

d) All of the mentioned


83. The unique identifier of the transaction that performed the write operation is called as _______

a) Transaction identifier

b) Data-item identifier

c) Old value

d) New value

84. The value of the data item prior to the write is called as _________

a) Transaction identifier

b) Data-item identifier

c) Old value

d) New value

85. If a transaction does not modify the database until it has committed it is said to use a _______
modification technique

a) Deferred

b) Immediate

c) More than one of the mentioned

d) None of the mentioned

86. We say that a transaction has been ________ when its commit log record has been output to
stable storage.

a) Locked

b) Completed

c) Committed

d) Released
87. State true or false: Using checkpoints reduces overhead

a) True

b) False

88. A __________ checkpoint is a checkpoint where transactions are allowed to perform updates
even while buffer blocks are being written out.

a) Temporary

b) Fuzzy

c) Permanent

d) Recovery

89. If the database modifications occur while the transaction is still active, the transaction is said to
use the __________ modification technique

a) Deferred

b) Immediate

c) More than one of the mentioned

d) None of the mentioned

90. A collection of data designed to be used by different people is called a/an

a) Organization

b) Database

c) Relationship

d) Schema
91. Which of the following is the oldest database model?

a) Relational

b) Deductive

c) Physical

d) Network

92. Which of the following schemas does define a view or views of the database for particular users?

a) Internal schema

b) Conceptual schema

c) Physical schema

d) External schema

93. Which of the following is an attribute that can uniquely identify a row in a table?

a) Secondary key

b) Candidate key

c) Foreign key

d) Alternate key

94. Which of the following are the process of selecting the data storage and data access
characteristics of the database?

a) Logical database design

b) Physical database design

c) Testing and performance tuning

d) Evaluation and selecting


95. Which of the following terms does refer to the correctness and completeness of the data in a
database?

a) Data security

b) Data constraint

c) Data independence

d) Data integrity

96. The relationship between DEPARTMENT and EMPLOYEE is a

a) One-to-one relationship

b) One-to-many relationship

c) Many-to-many relationship

d) Many-to-one relationship

97. A table can be logically connected to another table by defining a

a) Super key

b) Candidate key

c) Primary key

d) Unique key

98. If the state of the database no longer reflects a real state of the world that the database is
supposed to capture, then such a state is called

a) Consistent state

b) Parallel state

c) Durable state

d) Inconsistent state
99. Ensuring isolation property is the responsibility of the

a) Recovery-management component of the DBMS

b) Concurrency-control component of the DBMS

c) Transaction-management component of the DBMS

d) Buffer management component in DBMS

100. ______________ allow concurrent transactions to read (SELECT) a resource.

A. Update locks

B. Shared locks

C. Exclusive Locks

D. All of the mentioned

You might also like