Download RETE-DB - Manual
Transcript
E.4. DATABASE DESIGN 105 Simultaneous changes via a browser: When two users change a record at the same time, the second user who sends the update request will overwrite all modifications of the first user. Even fields that were not modified by the second user will be reset to their original value if the first user changed them. The risk of a second user overwriting the values of the first can be reduced by limiting the write access rights of every user to the necessary minimum. Should this case happen nonetheless, the second user will notice that more fields were changed than intended. The user can see the earlier changes in the history and undo the unintended modifications. Extremely rare situations: Supposed, two users press the submit button at the exact same time. Then it can happen that the history is partly inconsistent: • Two history entries might have the same timestamp. • The order of the history entries might be different from the order of the actual changes. This means that the actual value of a record might be logged in the second-latest history entry. • The displayed ’old value’ might be wrong. • There is a hidden and unused feature in RETE-DB, that logs not only the date of a change in the history but also the time intervals without change (see E.4.2). These time intervals might overlap. Unexpected errors: If the RETE-DB servlet is terminated or encounters an unexpected error, the following things can happen: • The latest history entries might be missing. • Some texts exist in the database but are not referenced. This is not a problem only a waste of memory. • Some uploaded files might exist but are not referenced. This is not a problem only a waste of memory. Conclusion: • It might occur, that one user overwrites changes of another user by accident if both users modify a record at the same time. • Some very unlikely situations produce small inconsistencies in the history. For most applications, these problems are acceptable: Data is not modified without cause, every change is logged in the history (except if the servlet is terminated in the right millisecond), access rights are not compromized.