![]() |
|
|
|
#1 |
|
Hi
a relatively complex project I am working on now has a need for "versioning". I mean, we have a system for administration of data (creating and updating) in a database, and this data needs to be saved as separate versions each time it is updated - a lot like a CVS. The data is in the main "bridges", which have lots of data (name, location, height etc), and lots of related data: persons (controller, supervisor); tasks to be performed... It should for example be possible for a user to view a "bridge" as it looked on a certain date in the past, with all its related data (as they also were at that date). Does anyone have some good ideas about how we can save a history of versions of all our objects? Where can I start to look for good ideas? Could we use CVS via some sort of java api? Thanks, Peter Peter Kirk |
|
|
|
|
#2 |
|
Posts: n/a
|
> a relatively complex project I am working on now has a need for
> "versioning". I mean, we have a system for administration of data (creating > and updating) in a database, and this data needs to be saved as separate > versions each time it is updated - a lot like a CVS. > <snip> > Does anyone have some good ideas about how we can save a history of versions > of all our objects? Where can I start to look for good ideas? Could we use > CVS via some sort of java api? I presume you're using a SQL database. I've handled this in the past by having a set of history tables that parallel my app's tables. For example, table bridge (id, name, location) table bridge_history (id, version#, user_id, timestamp, name, location) Make the primary key of the history table the id + the version #. The user_id tells you who made the change, and the timestamp tells you when it happened. If your database is not large, it's easiest just to create a complete snapshot of the record in the history table. If saving space is important, then just save the *old* values of the fields that changed. That's a lot more work, though, if you want to recreate a snapshot of the data at a given point in time. Chris |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New releases: My Darling Clementine, Affair To Remember & Bratz: The Movie: Updated complete downloadable R1 DVD DB & info lists | Doug MacLean | DVD Video | 0 | 10-09-2007 06:51 AM |
| DVD REVIEW -- "JFK: A Presidency Revealed" (2-Disc Set Produced By "The History Channel") | David Von Pein | DVD Video | 0 | 11-10-2006 02:43 AM |
| DVD Verdict reviews: A HISTORY OF VIOLENCE, WALLACE AND GROMIT IN THE CURSE OF THE WERE-RABBIT, and more! | DVD Verdict | DVD Video | 0 | 03-13-2006 09:32 AM |
| New Releases: SCTV, Huckabess & History: Updated complete downloadable R1 DVD DB & info lists | Doug MacLean | DVD Video | 0 | 12-17-2004 05:00 AM |
| OT... Would you by this DVD if it came with Easter Eggs? | Lookingglass | DVD Video | 0 | 09-10-2004 02:47 AM |