On Sun, Jun 15, 2014 at 1:39 PM, Ron Johnson <ron.l.johnson@cox.net> wrote:
On 06/15/2014 12:28 PM, Nick Hall wrote:
[snip]
> It was probably written for debugging. I can't find an equivalent import.
> Only values are written, so you would have to look at the code of the
> Gramps objects to understand the meaning of each value. The citation table
> is also missing in the raw export.

Yes, it was for debugging. When working on databases changes, it is sometimes nice to get a raw dump of the data. It would be trivial to write a importer, but it wasn't meant to be a real export format.
 
Save some code complexity by ripping it out?

Perhaps, but it is very short, and stand-alone.
 
> I don't think so.  We use a pickled format in the database.
>
> Each Gramps object has a serialize and unserialize method.  A primary
> object is serialized together with the secondary objects it contains.
> It is this serialized version that is stored in the database.

DB as "BLOB storage device?  Interesting...

Yes, in fact the Django databases uses the blob formats to keep speed up and keep compatibility. Knowing that we use the database mostly for these blobs, it should be fairly easy to swap out bsddb at some point, even if we use a relational database to store blobs.
 
> The Gramps XML is more human-readable and should be used for backups.

I do.  My curiosity was just piqued by the format, though.

BTW, one could also export in JSON too by calling .to_struct() on these objects as you write them out. That would also be an interesting format between raw and XML.

-Doug
 

--
My word, man!  Don't you know your quantum statistics?


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gramps-users mailing list
Gramps-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gramps-users