Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Design Data
I am working on a little side project and I am currently trying to work out how to hold a history.
At the top is a document, each document is a series of name / value pairs with the value potentially being a list of name / values itself. Each document is stored within a file and is human, as well as machine, readable.
 
So I need to contain the history within the document and keep it human readable. I would like to just append the file with the latest version, but that would result in a large file in the end with often only one or two values changing on each update.
 
My original idea was this:
 
0 {
  name bob
  age 42
  address {
    house 4
    road high street
  }
}
1 {
  # another year older
  age 43
}
2 {
  address {
    # change the house number
    house 7
  }
}
 
This works from a storage and retrieval perspective, however after a few versions it could become cumbersome. I can rebuild the content for any version from the previous ones, but is there a better way?
 
Remember I need to keep it human readable.
Posted 6-Feb-13 2:33am
Nagy Vilmos272.2K

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Try a document store database engine like my : RaptorDB - the Document Store[^]
Which does all this for you.
  Permalink  
Comments
Nagy Vilmos at 6-Feb-13 8:49am
   
I have looked at that and it is helping me a bit.
My issue is a design thing. The development is in Java as it is supposedly to run on Linux as well as Windows.
Mehdi Gholam at 6-Feb-13 8:53am
   
On java there are a number of doc stores like : orientdb etc. check this site : http://nosql-database.org/

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 520
1 Maciej Los 290
2 Richard MacCutchan 265
3 BillWoodruff 265
4 Suraj Sahoo | Coding Passion 155
0 OriginalGriff 8,764
1 Sergey Alexandrovich Kryukov 7,437
2 DamithSL 5,639
3 Maciej Los 5,279
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web01 | 2.8.1411028.1 | Last Updated 6 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100