More on Transactions
We'll cover the following...
Why Are Transactions Needed?
An interesting question is, are transactions really needed? Transactions can operate on single records or objects in a database or on multiple of them. Consider you are a day trader on Etrade and decide to sell 100 shares of Google. The database behind the scenes should minus 100 shares from your overall holding of Google stock and at the same time credit the proceeds from the sale into your account. Usually trades take 3 days to settle but we’ll ignore that fact for this example. Now the Etrade backend has to keep two pieces of data in sync, the portfolio holdings and the money in your account. If these pieces of information are stored in different tables in case ...
Access this course and 1400+ top-rated courses and projects.