Re: [gnome-db] database xml



On Sun, 2003-07-27 at 21:42, Philippe CHARLIER wrote:
> Hello,
> 
> First of all, to introduce myself, I am not specialist in
> programmation.  Just able to program some small (and running;-) gnome
> applications.
> I would like to start a more important project but I need a way to
> save/load datas.
> Those datas are organized in a table format and a database would be
> perfect.
> 
> After discovering "libgda", I had the impression it is the perfect tool.
> 
> I would like to create f.ex. a program to record airports data : airport
> name, code, latitude, longitude, runways, runway lengths, ... .
> The user should have the possibility to save/load those datas in an xml
> file (using the usual File->Save, File->Load menus) and of course, the
> program (to be usefull) must access those datas to search, display, ...
> .
> 
> I am searching since a few weeks in the doc, but the API reference gives
> an image of the trees and it seems I miss a more global view of the
> forest.  In clear I get no result : unable to create a database, read
> it, append data, ... .
> 
it should maybe be more clear that it is GdaXmlDatabase what you want.
I'll add to my TODO list extending the docs for that part.

> Does anybody has an example of code on how to :
> 
> - create a new XML database (name choosen by the user : f.ex.
> airports.db),
>
gda_xml_database or gda_xml_database_new_from_uri is what you want.

> - create tables in this XML database,
>
gda_xml_database_new_table

> - populate it with data,
>
gda_xml_database_new_table_from_model, or, after using
gda_xml_database_new_table, you can use gda_table_add_field and
gda_table_add_data_from_model.

> - search data in it,
>
GdaSelect has now basic support for SELECT queries. That is, you can do
simple queries (only one table supported so far). For an example of
usage, see the gda-evolution CVS module.

BTW, it would be really nice if somebody could help finishing GdaSelect,
so that it supports more complex queries. The current code is in
gda-select.[ch], so if somebody wants to have a look, please do, it
would be really nice to have it working, since it would allow us to add
full SQL support to non-SQL providers (such as the evolution one, or
LDAP, CSV, etc, etc).

> - display its data,
>
once you've got the data models, you can just display them in a
GnomeDbGrid, for instance.

> - and finally modify the data and save the new database.
> 
just modify the data models directly.

> Thanks in advance for your help.
> 
I must note though that all this might contain some unfinished things,
so please, when you find problems, tell us about them so we can fix them
soon,  before 1.0.

cheers




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]