What are the characteristics of the relational database attribute component mcq

Module 06: Transactions Management and Concurrency

1.A _________ consists of a sequence of query and/or update statements.
a) Transaction
b) Commit
c) Rollback
d) Flashback
Answer: a
Explanation: Transaction is a set of operation until commit.

2.Which of the following makes the transaction permanent in the database?
a) View
b) Commit
c) Rollback
d) Flashback
Answer: b
Explanation: Commit work commits the current transaction.

3.In order to undo the work of transaction after last commit which one should be used?
a) View
b) Commit
c) Rollback
d) Flashback
Answer: c
Explanation: Rollback work causes the current transaction to be rolled back; that is, it undoes all the updates performed by the SQL statements in the transaction.
4.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
Explanation: Once a transaction has executed commit work, its effects can no longer be undone by rollback work.

5.In case of any shut down during transaction before commit which of the following statement is done automatically?
a) View
b) Commit
c) Rollback
d) Flashback
Answer: c
Explanation: Once a transaction has executed commit work, its effects can no longer be undone by rollback work.

Crack Job Placement Aptitude in First Attempt

6.In order to maintain the consistency during transactions, database provides
a) Commit
b) Atomic
c) Flashback
d) Retain
Answer: b
Explanation: By atomic, either all the effects of the transaction are reflected in the database, or none are (after rollback).

7.Transaction processing is associated with everything below except
a) Conforming an action or triggering a response
b) Producing detail summary or exception report
c) Recording a business activity
d) Maintaining a data
Answer: a
Explanation: None.

8.A transaction completes its execution is said to be
a) Committed
b) Aborted
c) Rolled back
d) Failed
Answer: a
Explanation: A complete transaction always commits.

9.Which of the following is used to get back all the transactions back after rollback?
a) Commit
b) Rollback
c) Flashback
d) Redo
Answer: c
Explanation: None.

10. ______ will undo all statements up to commit?
a) Transaction
b) Flashback
c) Rollback
d) Abort
Answer: c
Explanation: Flashback will undo all the statements and Abort will terminate the operation.

Python Programming for Complete Beginners

11. I and J are _________ if they are operations by different transactions on the same data item, and at least one of them is a write operation.
a) Conflicting
b) Overwriting
c) Isolated
d) Durable
Answer: a
Explanation: I and J are conflicting if they are operations by different transactions on the same data item, and at least one of them is a write operation.

12. If a schedule S can be transformed into a schedule S’ by a series of swaps of non-conflicting instructions, then S and S’ are
a) Non conflict equivalent
b) Equal
c) Conflict equivalent
d) Isolation equivalent
Answer: c
Explanation: If a schedule S can be transformed into a schedule S’ by a series of swaps of non-conflicting instructions, then S and S’ are conflict equivalent. Not all serial schedules are conflict equivalent to each other.

13.A schedule is __________ if it is conflict equivalent to a serial schedule.
a) Conflict serializable
b) Conflicting
c) Non serializable
d) None of the mentioned
Answer: a
Explanation: A schedule is conflict serializable if it is conflict equivalent to a serial schedule. The concept of conflict equivalence leads to the concept.

14.The set of ________ in a precedence graph consists of all the transactions participating in the schedule
a) Vertices
b) Edges
c) Directions
d) None of the mentioned
Answer: a
Explanation: The set of vertices in a precedence graph consists of all the transactions participating in the schedule. Precedence graph is a simple and efficient way of determining conflict serializability of the schedule.

15.A ___________of the transactions can be obtained by finding a linear order consistent with the partial order of the precedence graph.
a) Serializability order
b) Direction graph
c) Precedence graph
d) Scheduling scheme
Answer: a
Explanation: A Serializability order of the transactions can be obtained by finding a linear order consistent with the partial order of the precedence graph. This process is called as topological sorting.

Crack Job Placement Aptitude in First Attempt

16.State true or false: If I = read(Q) and J = read(Q) then the order of I and J does not matter.
a) True
b) False
Answer: a
Explanation: If I = read(Q) and J = read(Q) then the order of I and J does not matter because both I and J are read operations on the query.

17. State true or false: If I = read(Q) and J = write(Q) then the order of I and J does not matter.
a) True
b) False
Answer: b
Explanation: If I = read(Q) and J = write(Q) then the order of I and J matters because both I and J are different operations on the query. The order of execution determines the state of the database that is being read or written.

18.Which of the following is the most expensive method?
a) Timestamping
b) Plain locking
c) Predicate locking
d) Snapshot isolation
Answer: c
Explanation: Predicate locking is the most expensive method and is generally not used in most databases.

19.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
Answer: a
Explanation: If a transaction Ti has obtained a shared-mode lock (denoted by S) on item Q, then Ti can read, but cannot write, Q.

20.If a transaction has obtained a ________ lock, it can both read and write on the item
a) Shared mode
b) Exclusive mod
c) Read only mode
d) Write only mode
Answer: b
Explanation: If a transaction has obtained an exclusive mode lock, then it can both read and write on the item on which it in operating.

Crack Job Placement Aptitude in First Attempt

21.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
Answer: a
Explanation: A transaction can proceed only after the concurrency control manager grants the lock to the transaction.

22.If a transaction can be granted a lock on an item immediately in spite of the presence of another mode, then the two modes are said to be ________
a) Concurrent
b) Equivalent
c) Compatible
d) Executable
Answer: c
Explanation: If a transaction can be granted a lock on an item immediately in spite of the presence of another mode, then the two modes are said to be compatible.

23.A transaction is made to wait until all ________ locks held on the item are released
a) Compatible
b) Incompatible
c) Concurrent
d) Equivalent
Answer: a
Explanation: A transaction is made to wait until all compatible locks held on the item are released. This ensures that no other transaction is concurrently accessing the same item.

24.State true or false: It is not necessarily desirable for a transaction to unlock a data item immediately after its final access
a) True
b) False
Answer: a
Explanation: It is not necessarily desirable for a transaction to unlock a data item immediately after its final access because serializability may be violated due to this.

25.The situation where no transaction can proceed with normal execution is known as ________
a) Road block
b) Deadlock
c) Execution halt
d) Abortion
Answer: b
Explanation: The situation where no transaction can proceed with normal execution is known as a deadlock.

Learn Machine Learning with Python from Scratch

26.The protocol that indicates when a transaction may lock and unlock each of the data items is called as __________
a) Locking protocol
b) Unlocking protocol
c) Granting protocol
d) Conflict protocol
Answer: a
Explanation: The protocol that indicates when a transaction may lock and unlock each of the data items is called as locking protocol. Locking protocols restrict the number of schedules.

27.If a transaction Ti may never make progress, then the transaction is said to be ____________
a) Deadlocked
b) Starved
c) Committed
d) Rolled back
Answer: b
Explanation: If a transaction Ti may never make progress, then the transaction is said to be starved.

28.The two phase locking protocol consists which of the following phases?
a) Growing phase
b) Shrinking phase
c) More than one of the mentioned
d) None of the mentioned
Answer: c
Explanation: The two phased locking protocol consists of the growing phase and the shrinking phase.

29.If a transaction may obtain locks but may not release any locks then it is in _______ phase
a) Growing phase
b) Shrinking phase
c) Deadlock phase
d) Starved phase
Answer: a
Explanation: If a transaction may obtain locks but may not release any locks then it is in growing phase. Growing phase is a phase in two phased locking protocol.

30.If a transaction may release locks but may not obtain any locks, it is said to be in ______ phase
a) Growing phase
b) Shrinking phase
c) Deadlock phase
d) Starved phase
Answer: b
Explanation: If a transaction may release locks but may not obtain any locks, it is said to be in shrinking phase. Shrinking phase is a phase in two phased locking protocol.

Python Programming for Complete Beginners

31.In order to maintain transactional integrity and database consistency, what technology does a DBMS deploy?
a) Triggers
b) Pointers
c) Locks
d) Cursors
Answer: c
Explanation: Locks are used to maintain database consistency.

32.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
Answer: d
Explanation: Locks are used to maintain database consistency.

33.Which of the following are introduced to reduce the overheads caused by the log-based recovery?
a) Checkpoints
b) Indices
c) Deadlocks
d) Locks
Answer: a
Explanation: Checkpoints are introduced to reduce overheads caused by the log-based recovery.

34. 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
Answer: b
Explanation: Time-stamp ordering protocol ensures conflict serializability and safety from deadlocks.

35.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
Answer: c
Explanation: A block that is not permitted to be written back to the disk is called pinned.

Crack Job Placement Aptitude in First Attempt

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

37.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
Answer: a
Explanation: Concurrency is a property of systems in which several computations are executing simultaneously, and potentially interacting with each other.

38.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
Answer: c
Explanation: A distributed lock manager (DLM) provides distributed software applications with a means to synchronize their accesses to shared resources.

39.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
Answer: d
Explanation: Lock is limited to the attributes of the relation.

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

Crack Job Placement Aptitude in First Attempt

41. 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
Answer: c
Explanation: When one data item is waiting for another data item in a transaction then system is in deadlock.

42.The deadlock state can be changed back to stable state by using _____________ statement.
a) Commit
b) Rollback
c) Savepoint
d) Deadlock
Answer: b
Explanation: Rollback is used to rollback to the point before lock is obtained.

43.What are the ways of dealing with deadlock?
a) Deadlock prevention
b) Deadlock recovery
c) Deadlock detection
d) All of the mentioned
Answer: d
Explanation: Deadlock prevention is also called as deadlock recovery. Prevention is commonly used if the probability that the system would enter a deadlock state is relatively high; otherwise, detection and recovery are more efficient.

44. 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
Answer: a
Explanation: The wait–die scheme is a non-preemptive technique.

45.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
Answer: c
Explanation: The wound–wait scheme is a preemptive technique. It is a counterpart to the wait–die scheme.

Python Programming for Complete Beginners

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

47.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
Answer: a
Explanation: Each transaction involved in the cycle is said to be deadlocked.

48. 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
Answer: a
Explanation: Each transaction involved in the cycle is said to be deadlocked.

49.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
Answer: d
Explanation: We should roll back those transactions that will incur the minimum cost.

50. __________ rollback requires the system to maintain additional information about the state of all the running transactions.
a) Total
b) Partial
c) Time
d) Commit
Answer: b
Explanation: In total rollback abort the transaction and then restart it.

Crack Job Placement Aptitude in First Attempt

51.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
Answer: a
Explanation: A system is in a deadlock state if there exists a set of transactions in which every transaction is waiting for another transaction in the set.

52. Which of the following is not a method in deadlock handling
a) Deadlock prevention
b) Deadlock detection
c) Deadlock recovery
d) Deadlock distribution
Answer: d
Explanation: Deadlock distribution is not a method in deadlock handling whereas, deadlock prevention is followed by deadlock detection and deadlock recovery.

53. Deadlocks can be prevented using
a) Preemption and transaction rollbacks
b) Wait and die scheme
c) Wound-wait scheme
d) All of the mentioned
Answer: d
Explanation: Preemption and transaction rollbacks, wait and die scheme, wound wait scheme are all different methods of deadlock prevention.

54.State true or false: Wait die scheme is a non-preemptive technique
a) True
b) False
Answer: a
Explanation: The wait-die scheme is a non-preemptive technique. 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).

55.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
Answer: d
Explanation: In lock timeout method, unnecessary rollbacks do not occur, transactions do not starve and it is also easy to implement and is hence widely used if transactions are short and long waits are likely to be due to deadlocks.

Python Programming for Complete Beginners

56.The _________ graph describes deadlocks precisely
a) Wound wait graph
b) Wait die graph
c) Wait for graph
d) None of the mentioned
Answer: c
Explanation: The wait for graph describes deadlocks precisely. Existence of a cycle in this graph implies that a deadlock will occur.

57.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
Answer: c
Explanation: We generally recover from deadlocks by rolling back only a selected number of transactions

58.State true or false: Partial rollback is not possible.
a) True
b) False
Answer: b
Explanation: Partial rollback is possible but it requires the system too maintain an additional amount of information on the states of the transactions.

59.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
Answer: d
Explanation: While choosing a victim we much choose the one with a minimum cost. That is the one which avoids starvation, the one with the least number of transaction involved in the rollback and the one with the least amount of data items used

Learn Machine Learning with Python from Scratch

What are the characteristics of relational database attribute component?

In relational databases, attributes are the describing characteristics or properties that define all items pertaining to a certain category applied to all cells of a column. The rows, instead, are called tuples, and represent data sets applied to a single entity to uniquely identify each item.

What represents an attribute in a relational database Mcq?

What represents an 'attribute' in a relational database? Explanation: Each column in a table represents a feature (attribute) of a record.

Which of the following are characteristics of an RDBMS Mcq?

Which of the following are characteristics of an RDBMS? Tables are linked by common data known as keys. Queries are possible on individual or groups of tables. Data are organized in a series of two-dimensional tables each of which contains records for one entity.

What are the properties of relational database model Mcq?

Properties of RDBMS Cells contains atomic values. Values in a column are of the same kind. Each row is unique. No two tables can have the same name in a relational schema.

Toplist

Neuester Beitrag

Stichworte