recategorized by
18,562 views

5 Answers

Best answer
53 votes
53 votes
Row level locking provides more concurrency, because different transactions can access different rows in a table / page at same time,

Correct Answer: $C$
22 votes
22 votes
 Page level locking locks whole page i.e., all rows therefore highly restrictive.
 Table level locking is mainly used for concurrency control with DDL operations.
 A row share table lock is the least restrictive, and has the highest degree of concurrency for a table. It indicates the transaction has locked rows in the table and intends to update them.
13 votes
13 votes

Correct Ans is option (C)

Explanation:

A database lock is used to “lock” some data in a database so that only one database user/session may update that particular data. So, database locks exist to prevent two or more database users from updating the same exact piece of data at the same exact time. When data is locked, then that means that another database session can NOT update that data until the lock is released (which unlocks the data and allows other database users to update that data. Locks are usually released by either a ROLLBACK or COMMIT SQL statement.

Database locking techniques
Database locks can actually be placed at different levels – also known as lock granularity – within the database.

Database level locking in lowest to highest order of degree of concurrency

With database level locks, the entire database is locked – which means that only one database session can apply any updates to the database. It has the lowest Degree of concurrency

File level locking
With a file lock level, an entire database file is locked. What exactly is a file in a database? Well, a file can have a wide variety of data – inside a file there could be an entire table, a part of a table, or even parts of different tables. 

Table level locking

It means that an entire table is locked as a whole. This lock level use when making a change that affects an entire table, like updating all the rows in a table, or modifying the table to add or remove columns. In Oracle, this is known as a DDL lock, because it’s used with DDL (Data Definition Language) statements like CREATE, ALTER, and DROP – basically statements that modify the entire table somehow or the other.

Page or block level locking
Block, or page, level locking occurs when a block or page that is part of a database file is locked. Because the data that can be stored in blocks/pages can be wide and varied, page/block locking is less favored in databases today.

Column level locking

A column level lock just means that some columns within a given row in a given table are locked. This form of locking is not commonly used because it requires a lot of resources to enable and release locks at this level. Also, there is very little support for column level locking in most database vendors.

Row level locking
A row level lock applies to a row in a table. This is also the most commonly locking level, and practically all major database vendors support row level locks. It has highest level of degree of concurrency.

0 votes
0 votes

https://en.wikipedia.org/wiki/Record_locking

A higher degree of granularity is achieved if each individual account may be taken by a clerk. This would allow any customer to be serviced without waiting for another customer who is accessing a different account. This is analogous to a record level lock and is normally the highest degree of locking granularity in a database management system.

In a SQL database, a record is typically called a "row."

Answer:

Related questions

43 votes
43 votes
6 answers
1
Ishrat Jahan asked Nov 2, 2014
12,130 views
Consider the following schedule $S$ of transactions $T1$ and $T2:$$${\begin{array}{l|l}\textbf{T1}& \textbf{T2} \\\hline\text{Read(A)} \\\text{A = A – 10}\\& \text...
38 votes
38 votes
3 answers
3
Ishrat Jahan asked Nov 2, 2014
10,843 views
Consider two tables in a relational database with columns and rows as follows:$$\overset{\text{Table: Student}}{\begin{array}{|c|c|c|} \hline \textbf {Roll_no} & \textbf{...
43 votes
43 votes
5 answers
4
Ishrat Jahan asked Nov 2, 2014
10,532 views
A table T1 in a relational database has the following rows and columns: $$\begin{array}{|c|c|c|} \hline \text {Roll no. } & \text {Marks} \\\hline 1& 10 \\\hline 2 & 20 ...