From: Algis K. <aka...@pc...> - 2008-10-06 13:02:43
|
Benny. On Mon, 6 Oct 2008 19:13:17 Benny Malengier wrote: I see the point you made. I had a little peek at the data base structure: starting from ~.gramps -> grampsdb -> <hased dir name>: various *.db files name.txt with the human readable name of the data base. In the source directory of gramps, ~/gramps-trunk/src/Simple there are some utilities to access data base to enable acess to the data base for possible report writing. The files are well documented with many pythin doc-strings. It would be a nice place to start poking around the data base in order to find out more about the actual data structures in the (for me mysterious) bsdb files. Looking at the _SimpleAccess.py, I do not understand the very first statement def __init__(self, dbase): ... How does one specify "dbase"? I think that <Simple> would be an excellent place to try some direct access to the data base at a fairly low level, which in fact would enable any form of tabulation for anyone with some familiarity with Python, possibly satisfying anita kean's wishes. Can you help to uravel this mystery of direct access to gramps data base? Kind regards and thank you for all your answers, OldAl. > 2008/10/5 anita kean <ak...@pa...> > > > Hello grampslist > > > > I would like to upload/inspect/edit data in the gramps database > > from the command line. > > > > I haven't been able to find much documentation on how to > > inspect the gramps Berkeley database (bsddb?), > > but a good start would be to know the full description of > > the tables that gramps writes to: equivalent to the > > mysql commands: > > > > mysql> show tables > > mysql> desc tablename > > which gives output of the form: > > +---------+-------------+------+-----+---------+-------+ > > > > | Field | Type | Null | Key | Default | Extra | > > > > +---------+-------------+------+-----+---------+-------+ > > > > | field1 | char(7) | NO | PRI | 0000000 | | > > | field2 | varchar(35) | NO | | | | > > | field3 | double(5,2) | NO | | 0.00 | | > > | field4 | char(1) | NO | | | | > > | field5 | double(5,2) | NO | | 0.00 | | > > | field6 | char(3) | YES | | NULL | | > > > > +---------+-------------+------+-----+---------+-------+ > > > > Is there any method short of reading the source code to know > > the full table descriptions for the database? > > The very minimal example in the manual for csv upload > > only lists a few columns in each table (surname, firstname, birthdate, > > birthplace,...) but there are many more in the gui and the exported > > website (email, address, notes, event and associated fields, ...) which > > aren't illustrated. What are the specifications on these fields? > > I'd also like details on entries for media files and their links to > > events in > > the narrative website. > > > > What are the table descriptions for the grampsdb tables? > > Also, is there any way other than the gui for inspecting the database? > > Gramps uses an embedded database that is a building block for higher level > databases (like mysql, ...) . So the code handles everything (sec keys, > lookup, conversion) which means a large speedup but a lot of coding > overhead opposed to easy databases like sql ones. > The drawback is also that what you want to do is just not possible, the > bsddb database does not work like that. You have to see it as a big storage > dump you can build everything from with code. > > Benny > > > Thanks > > Anita - a command-liner > > > > > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move Developer's > > challenge > > Build the coolest Linux based applications with Moblin SDK & win great > > prizes > > Grand prize is a trip for two to an Open Source event anywhere in the > > world http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ > > Gramps-users mailing list > > Gra...@li... > > https://lists.sourceforge.net/lists/listinfo/gramps-users -- Dr Algis Kabaila (PhD Eng) http://akabaila.pcug.org.au/StructuralAnalysis/ ------------------------------------------------ |