Answered! A reservation transaction in an airline reservation system makes a reservation on a flight, reserves a seat on the…

A reservation transaction in an airline reservation system makes a reservation on a flight, reserves a seat on the plane, issues a ticket, and debits the appropriate credit card account. Assume that one of the integrity constraints of the reservation database is that the number of reservations on each flight does not exceed the number of seats on the plane. Explain how transactions running on this system might violate.

a. Atomicity

b. Consistency

c. Isolation

d. Durability

Expert Answer

For this question I’m providing the brief on each property and applying reservation system on each and finding the violation cases.

In order to perform a Transaction in a database system and to make sure it works without any issues, there are few rules a Database Transaction should follow. These rules are the standards across all Relational Database systems (RDBMS) and are called ACID rules.

ACID stands for Atomicity, Consistency, Isolation and Durability. So let’s check what all these Rules states.

In our AirLine reservation system is as follows

1) Atomicity

Atomicity states that every Transaction should be atomic in nature. A Transaction in a Relational Database can contain either a single SQL statement or multiple SQL statements. Thus by Atomic Transaction it means “all or none”. Either all SQL statements/steps execute successfully in a transaction, or fail as a single unit and none of them should be treated as executed and the system should be returned to its original state.

In our reservation system , following are the atomic operation

1) Reserve the seat on plan based on overall availability

2) Debit the Amount from credit card account and

3) Issue the confirmed ticket

We need to be consider all operatoion ahould be happend or nothing happend

2)Consistency:

Consistency states that any Transaction happened in a database will take it from one consistent state to another consistent state. The data finally recorded in the database must be valid according to the defined Rules, Constraints, Cascades, Triggers, etc. If in case of any failure to these rules the changes made by any transaction should be rolled-back, this will put the system in earlier consistent state.

In our Reservation system, as per consistency it should follow below rules

1) Reserve the seat on plan based on overall availability

2) Debit the Amount from credit card account and

3) Issue the confirmed ticket

If above provided all 3 steps completed then it should be consistent mode.

Let suppose if failed the 2nd step, due to database node down/overload , it should back previous consistent state. Other wise we’ll consider it as voilation.

3) Isolation:

Isolation means Transactions performing same functions should run in Isolation and not in parallel to provide more concurrency to the data and avoiding dirty reads & writes. One need to use proper Transaction Isolation levels and locking in order to prevent this.

In our Reservation System , isolation with respect to total no of ticket availability we need to take care

let suppose , if system allow to book more ticket , beyond the range of airline capacity, its violation. For this purpose we need to maintain the locking mechanism wrt to total range of ticket in airline

We need to avoid the parallel execution on shared data at a time

4) Durability:

Durability, a transaction should be durable by storing the data permanently and making it available in case of power failure, recovery from system failure, crash, any error, etc. All in all, the data should not get lost in any of the miss-happenings and one should be able to recover data from restore, logging and other methods.

In reservation system as part of Durability we need to take care following things

1) All end customer flight reservation details available in the database

2) Maintaining the failover mechanism all the times in order to maitain the data to customer

3) In any cost data should not be lost

As per the Reservation System, we need to follow the above mentioned ACID properties. If we failed to follow any rule , its leads to Violation. As a consequence   Reservation system not in Atomic , Consistent ,Isolated and Durable phase.

Still stressed from student homework?
Get quality assistance from academic writers!