Hi, I have a system with a rather peculiar database design: Most tables are "insert-only" tables, meaning a row will never be updated or deleted. This is being done in order to retrieve the data as of any given point in time. Each row has a timestamp and in order to get the latest version of the row, one has to look for the maximum timestamp.
When a record is logically deleted, a new row is being inserted with the current timestamp and a deleted flag set to yes.
With this the operations for each table are as follows:
Inquiry: get valid row as of a certain time if not flagged as deleted as of the specified time
Update: insert a new row with the updated data
Delete: insert a new row with a deleted flag set
I am in the process of re-architecting this system and it would be great if I could use hibernate. But despite looking through the docs, FAQ, etc. I have not been able to figure out if hibernate could work with tables like this.
Any pointer would be appreciated! Thanks so much for your help!
|