Presentation on theme: "Fakultas Ilmu Komputer UI 1 Exercise A series of actions to be taken on the database such that either all actions are completed successfully, or none of."— Presentation transcript:
Fakultas Ilmu Komputer UI 1 Exercise A series of actions to be taken on the database such that either all actions are completed successfully, or none of them can be completed, is known as a(n): a.)checkpoint. b.)log. c.)lock. d.)transaction. e.)concurrent.
Fakultas Ilmu Komputer UI 2 Exercise When two transactions are being processed against the database at the same time, a.)they are called concurrent transactions. b.)they are usually parallel. c.)they always result in a lost update problem. d.)one must be rolled back. e.)none of them
Fakultas Ilmu Komputer UI 3 Exercise …. means a transaction executes when all actions of the transaction are completed fully, or none are. This means there are no partial transactions (such as when half the actions complete and the other half do not). …. involves beginning a transaction with a ’consistent’ database, and finishing with a ’consistent’ database. For example, in a bank database, money should never be ”created” or ”deleted” without an appropriate deposit or withdrawal. Every transaction should see a consistent database. ….ensures that a transaction can run independently, without considering any side effects that other concurrently running transactions might have. ….define the persistence of committed data: once a transaction commits, the data should persist in the database even if the system crashes before the data is written to non-volatile storage. A …. is a series of (possibly overlapping) transactions. A …..occurs when a transaction reads a database object that has been modified by another not-yet-committed transaction. A …..is one in which a transaction can commit only after all other transactions whose changes it has read have committed.
Fakultas Ilmu Komputer UI 4 Recoverable schedule Schedule Atomicity Durability Isolation Dirty Read Consistency Cascading rollback
Fakultas Ilmu Komputer UI 5 Exercise How many serial schedule exist for 2 transaction (T1 & T2) ? How many serial schedule exist for 3 transaction (T1 & T2 & T3) ? How many serial schedule exist for N transaction ?
Fakultas Ilmu Komputer UI 6 Is schedule S serializable ? Schedule S: T1T2 Read(A); A A+100; Write(A); Read(A); A A 2; Write(A); Read(B); B B+100; Write(B); Read(B); B B 2; Write(B);
Fakultas Ilmu Komputer UI 7 Exercise Draw the precedence graph What is the serial equivalent schedule ?
Fakultas Ilmu Komputer UI 8 Draw the precedence graph What is the serial equivalent schedule ?
Fakultas Ilmu Komputer UI 9 Next exercise a.Draw the precedence graph for this schedule b.What is the equivalent serialization order for this schedule? If no order is possible, why? c.Assume that transaction T4 did not run at all. What is the precedence graph in this case? d.Is schedule in c belongs to serializable schedule ? e.What is the serial equivalent schedule of c ?