In general, it is fair to say that locks are primarily used to ensure that only one user/session can update a particular piece of data. Two types of locks can be discussed here: shared locks (S) and exclusive locks (X). These locks can be held on tables, pages, index keys, or single rows.  Shared Lock - When an operation requests a shared lock on a table, the table is opened for reading, if permitted. This lock can be shared with other read operations to read the table concurrently.  Exclusive Lock - If the operation requires an exclusive lock on the table, you have exclusive write permission on the table, if allowed. Requesting access to this locked table will block other operations.  There is another concept related to locks called intent (I) locks. There are intent shared (IS) locks and intent exclusive (IX) locks. These locks allow finer-grained concurrency control. Technically we don't need them. S and X locks are sufficient, but they help optimize queries.  This is a regular feature in DBMS interview questions for freshers, be ready to tackle it.