You are on page 1of 3

1. what is transaction in DBMS? ACID properties.

In a Database Management System (DBMS), a transaction refers to a logical unit of


work that consists of one or more operations that must be executed as a single,
indivisible unit.
Atomicity: This property ensures that a transaction is treated as a single,
indivisible unit of work. Either all the operations within the transaction are
successfully completed, or none of them are. If any part of the transaction fails,
the entire transaction is rolled back to its original state, ensuring that the
database remains in a consistent state.

Consistency: This property ensures that a transaction brings the database from
one consistent state to another. The database must satisfy a set of integrity
constraints before and after the transaction. If a transaction violates any integrity
constraint, it is rolled back to maintain consistency.

Isolation: Isolation ensures that the intermediate state of a transaction is not


visible to other transactions. Each transaction operates in isolation from others
until it is committed. This prevents interference between transactions that might
be executing concurrently.

Durability: Once a transaction is committed, its effects are permanent and survive
subsequent failures.
2. what is meant by the concurrant excecution of database transaction in
amultiuser system.
Concurrent execution of database transactions in a multiuser system refers to the
situation where multiple transactions are being executed simultaneously by
different users or processes. In a multiuser environment, several users may
interact with the database concurrently, and their transactions may overlap in
time. This concurrency introduces the potential for several issues, such as data
inconsistency, conflicts, and interference, which need to be carefully managed by
the database management system (DBMS).

3. The Lost Update Problem. This problem occurs when two transactions that
access the same database items have their operations interleaved in a way that
makes the value of some database items incorrect.

The Temporary Update (or Dirty Read) Problem. This problem occurs when
one
transaction updates a database item and then the transaction fails for some reason.
The Incorrect Summary Problem. If one transaction is calculating an aggregate
summary function on a number of database items while other transactions are
updating some of these items, the aggregate function may calculate some values
before they are updated and others after they are updated.

The Unrepeatable Read Problem. Another problem that may occur is called
unrepeatable read, where a transaction T reads the same item twice and the item is
changed by another transaction T′ between the two reads.
4.* Transactions:
Definition: In the context of a Database Management System (DBMS), a
transaction is a sequence of one or more database operations (such as reads and
writes) that are executed as a single, indivisible unit of work.
Properties: Transactions adhere to the ACID properties (Atomicity, Consistency,
Isolation, Durability)
* Database Items:
Definition: Database items refer to the basic units of data stored in a database.
These can include individual fields in a record or entire records, depending on the
database model. Example: In a relational database, a database item could be a
specific column (attribute) within a table.
Read and Write Operations:
* Read Operation: A read operation involves retrieving data from the database
without modifying it. It is used to access and view information.
* Write Operation: A write operation involves modifying the data in the database.
This can include inserting new data, updating existing data, or deleting data.
Example: If you execute a SQL SELECT statement to retrieve information from a
database, it's a read operation. If you execute an UPDATE statement to modify the
data, it's a write operation.
DBMS Buffers : Definition: In a DBMS, buffers are areas of memory used to
temporarily hold data.
Read Buffer: When data is read from the database, it is often stored temporarily in
a read buffer to facilitate subsequent reads without going back to the physical
storage.
Write Buffer: Similarly, when data is modified or inserted, it may be initially
written to a write buffer before being permanently stored on the disk.
Buffer Management: The DBMS is responsible for managing these buffers
efficiently to balance the need for quick access with the limitations of available
memory.

You might also like