Using the two-step commit presented at the beginning of Chapter 7 in the textbook, describe how to avoid assigning one seat to two persons, as for example in an airplane. That is, list precisely which steps in your opinion the database manager should follow in assigning passengers to seats.
The two steps in this process is intent and commit.
Intent:
First we have to check the value of “COMMIT-FLAG” in this database, if the value is set, then wait till it is next available else ,proceed to second step .
Checking for the availability of seats in the flight
Database manager prepare a selection of seats in the seat database.
Commit:
The COMMIT-FLAG is set in the database to avoid multiple persons booking same seat.
Seat file is copying to database for seats
Now flight ticket is created,and show that the transaction is completed
Update the database
Unset COMMIT-FLAG
Get Answers For Free
Most questions answered within 1 hours.