Atomicity refers to the ability of the DBMS to guarantee that either all of the tasks of a transaction are performed or none of them are. For example, the transfer of funds from one account to another can be completed or it can fail for a multitude of reasons, but atomicity guarantees that one account won't be debited if the other is not credited.
Atomicity states that database modifications must follow an “all or nothing” rule. Each transaction is said to be “atomic.” If one part of the transaction fails, the entire transaction fails. It is critical that the database management system maintain the atomic nature of transactions in spite of any DBMS, operating system or hardware failure.
The Consistency property ensures that the database remains in a consistent state before the start of the transaction and after the transaction is over (whether successful or not).
Consistency states that only valid data will be written to the database. If, for some reason, a transaction is executed that violates the database’s consistency rules, the entire transaction will be rolled back and the database will be restored to a state consistent with those rules. On the other hand, if a transaction successfully executes, it will take the database from one state that is
Isolation refers to the requirement that other operations cannot access or see the data in an intermediate state during a transaction. This constraint is required to maintain the performance as well as the consistency between transactions in a DBMS.
Durability refers to the guarantee that once the user has been notified of success, the transaction will persist, and not be undone. This means it will survive system failure, and that the database system has checked the integrity constraints and won't need to abort the transaction. Many databases implement durability by writing all transactions into a transaction log that can be played back to recreate the system state right before a failure. A transaction can only be deemed committed after it is safely in the log.
2. TP monitor is a control program that manages the transfer of data between multiple local and remote terminals and the application programs that serve them. It may also include programs that format the terminal screens and validate the data entered.In a distributed client/server environment, a TP monitor provides integrity by ensuring that transactions do not get lost or damaged. It may be placed in a separate machine and used to balance the load between clients and various application servers and database servers. It is also used to create a high availability system by switching a failed transaction to another machine thus avoiding any database or machine to be overwhelmed.
3. Load balanacing - MOM Message Orientated Middleware supports asynchronous communication whereas RPC Remote Procedure Call - is a synchronous communication where the calling application must stop processing or is blocked from proceeding until receiving the response from the remote procedure. In the scenario, TP Monitoring has greater performance advantage in load balancing over both RPC and MOM. TP monitoring would implement the following in load balancing, use queued input buffer to protect against peak in the workload;
priority scheduling to prioritize messages; support server threads to save overhead of heavy weight processes; and make sure that none of the process would be overloaded.
4. With one-phase atomic commit protocol, a server could make a decision by itself to abort transaction. As a result, the consistency of the transaction would be affected.
With two-phase commit protocol, the coordinator would co-ordinate and consolidates an unique decisions of all the servers and client involved before a final decision on whether to abort or commit a transaction which could ensure the consistency of the transaction.
Two-phase commit protocol provides the advantages over one-phase atomic commit protocol. Automatic recovery mechanism: transaction will be recovered as long as a system or media is failure during transaction executing. Synchronization among all participating databases: all database servers will receive the same action, either commit or rollback.
No comments:
Post a Comment