-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate fit for "Insert-Only" tables?
PostPosted: Mon Aug 07, 2006 5:59 am 
Newbie

Joined: Mon Aug 07, 2006 2:43 am
Posts: 1
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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.