Welcome to Lesson 5 of Module 2 on Introduction to Databases and Database Management Systems. I'm going to start with a personal question that I want you to think about throughout this lesson. What database transactions have you made today? You have three objections in this lesson today, you should be able to provide an example of a transaction that you have made recently. In this example, you should briefly explain the key characteristics of database transactions. I want you to explain the meaning of the word transparency for transaction processing services. Transaction processing has strong analogy to production management. Whereas production management involves the control of physical goods, transaction management involves the control of information goods. Transaction management, like management of physical goods is enormously important to modern organizations. Organization such as banks with automatic tellers, airlines with online reservations systems, and universities with online registrations could not function without reliable and efficient transactions processing. Large organizations now conduct thousand of transactions per minute with continued growth and electronic commerce and mobile computing, the importance of transaction processing will continue to increase. In common discourse, a transaction is interaction among two more parties for the conduct of business, such as buying a car from a dealership. Database transactions have a more precise meaning, however. A database transaction involves a collection of operations that must be reliably processed is one unit of work. So transactions are all or nothing meaning that all operations of a transaction must either succeed or the entire transaction is cancelled. Transactions should be processed reliably so that there's no loss of data due to interference among concurrent users, users operating at the same time, and failures such as operating system crashes. The requirement for no loss of data adds overhead, but this requirement is crucial to the success of organizations. Now let's look at some pseudocode for an airline transaction. This code indicates the data request from a user, such as flight preferences, in the interaction with the database such as updating a flight record. Making an airline reservation typically involve reservations for the departure and return. To a traveler, the combination of the departure and the return is a transaction, not the departure and the return separately. If a departure and return were considered separately, a traveler may make a departure without obtaining a desired return flight. In the pseudo code example, you should note that the multiple database operations are necessary. Two update operations for the departure and return records and one INSERT operation for the reservation record are necessary. You should also note the exception handling indicted by the line with On Error. If any kind of error occurs, such as loss of connection, any partial actions are removed with a ROLLBACK statement. After the COMMIT executes, all actions are recorded in a database without interference from multiple users and loss of data from failures. For a second example, let's consider ATM transaction. These transactions have been common since the early 1970s during the early days of database management software and database development. The structure of the ATM transaction is similar to the airline reservation example. The ATM transaction example shows data requested from the user such as account number and transaction type. Multiple database actions occur such as posted to debt and corresponding credit to the bank's accounts. If failure occurs before the transaction terminates all actions are removed or undone with the on error and rollback line. Database management systems provide two services to ensure reliable transaction processing. DBMS's ensure that concurrent users, that is users operating at the same time, do not overwrite each other or cancel each others actions. Without proper control, work can be lost as one concurrent user overrides another concurrent user. DBMS's also ensure that a failure after a transaction finishes will not result in loss of data. Two internal features of a DBMS provide these services, concurrency for controlling actions of concurrent users and the recovery manager for dealing with failures, such as communication errors and software crashes. It is important to note that these services are internal and transparent to the database developers. In common usage, transparency means that you can see through an object, rendering its inner details invisible. For DB messes, transparency means that the inner details of transaction services are invisible. Transparency is very important because services that ensure reliable processing are really difficult to implement. By providing these services, DBMS has improved the productivity of database developers because database developers do not need to write any code to use these services. However these services have overhead that may require more resources such as servers, disks, and memory. This lesson has introduced the ideas of transactions and transaction processing. Transactions are units of information work that must be processed together. DBMS's provide services that ensure reliable transaction processing with no data losses from concurrent users and failures after completion. Transaction processing requirements and DBMS capabilities continue to evolve even after 50 years since the introduction of ATMs and early transaction processing software. One of the recent areas of DBMS development has been methods to reduce overhead for greater demands of electronic commerce and mobile computing. Now let me return to the question I posed in the beginning of this lesson. Can you identify a database transaction that you have performed and indicate the types of information you provided and the actions made on the database to complete the transaction?