Required Properties of a Transaction (Cont.) Consistency requirement in above example: The sum of A and B is unchanged by the execution of the transaction In general,consistency requirements include Explicitly specified integrity constraints such as primary keys and foreign keys Implicit integrity constraints -e.g.,sum of balances of all accounts,minus sum of loan amounts must equal value of cash-in-hand A transaction,when starting to execute,must see a consistent database. During transaction execution the database may be temporarily inconsistent. When the transaction completes successfully the database must be consistent Erroneous transaction logic can lead to inconsistency Database System Concepts-6th Edition 14.5 @Silberschatz,Korth and SudarshanDatabase System Concepts - 6 14.5 ©Silberschatz, Korth and Sudarshan th Edition Required Properties of a Transaction (Cont.) Consistency requirement in above example: The sum of A and B is unchanged by the execution of the transaction In general, consistency requirements include Explicitly specified integrity constraints such as primary keys and foreign keys Implicit integrity constraints – e.g., sum of balances of all accounts, minus sum of loan amounts must equal value of cash-in-hand A transaction, when starting to execute, must see a consistent database. During transaction execution the database may be temporarily inconsistent. When the transaction completes successfully the database must be consistent Erroneous transaction logic can lead to inconsistency