integrity constraint
-
The quote below is from An Introduction to Database Systems, 8th edition, C J Date. Is that possible systems crash while transferring updates from the physical device to the database? If yes, since transactions are the unit of recovery, those updates that are written to the database should be undone?
"It is quite possible, for instance, that the system might crash after the COMMIT has been honored but before the updates have been physically written to the database--they might still be waiting in a main-memory buffer and so lost at the time of the crash. Even if that happens, the system's restart procedure will still record those updates in the database: it is able to discover the values to be written by examining the relevant records in the log."
-
The quote below is from An Introduction to Database Systems, 8th edition, C J Date. Is that possible systems crash while transferring updates from the physical device to the database? If yes, since transactions are the unit of recovery, those updates that are written to the database should be undone?
"It is quite possible, for instance, that the system might crash after the COMMIT has been honored but before the updates have been physically written to the database--they might still be waiting in a main-memory buffer and so lost at the time of the crash. Even if that happens, the system's restart procedure will still record those updates in the database: it is able to discover the values to be written by examining the relevant records in the log."
Not sure if I understand the question correctly, but are you looking for [Rollforward?](https://en.wikipedia.org/wiki/Transaction\_processing#Rollforward) . With rollforward, when the database is recovered, all the logs are reapplied and in the end, everything that is not committed is rolled back. This guarantees a consisted situation even after crash. If the recovery is interrupted because of a new crash, the recovery is simply started from the beginning next time.
-
Not sure if I understand the question correctly, but are you looking for [Rollforward?](https://en.wikipedia.org/wiki/Transaction\_processing#Rollforward) . With rollforward, when the database is recovered, all the logs are reapplied and in the end, everything that is not committed is rolled back. This guarantees a consisted situation even after crash. If the recovery is interrupted because of a new crash, the recovery is simply started from the beginning next time.
Many thanks! Sorry can you please explain this: If the system crash after the COMMIT has been honored but just part of the updates have been physically written to the database other parts are still waiting in a main-memory buffer, then what will happen? How they know that just part of the data is written?
-
Many thanks! Sorry can you please explain this: If the system crash after the COMMIT has been honored but just part of the updates have been physically written to the database other parts are still waiting in a main-memory buffer, then what will happen? How they know that just part of the data is written?