A timestamp is a set of random numbers generated based on the current system time. Timestamps are generally used as a basis for judging the uniqueness of data.
Assumptions: Bank A and Bank B open your account almost at the same time and see the original deposit of 1,000 yuan in your account, and then both banks want to add a deposit of 500 yuan to your account. Then, Bank A changes the amount from 1,000 yuan to 1,500 yuan, and at the same time, Bank B also changes the amount from 1,000 yuan to 1,500 yuan. That's bad! In the end, you end up with only 1,500 yuan in your bank account instead of the 2,000 yuan you should have, which is equivalent to a loss of 500 yuan! This is a serious problem caused by modifications without locking the data. However, we can solve this problem neatly through timestamps. |