Re: [gnome-db] Re: question: in memory table representation: please help



On Sun, 31 Oct 2004 18:56:35 -0700, Neil Zanella <nzanella gmail com> wrote:
[...]
> 
> > Mergeant provides the envoriment to develop the databases, relationships
> > etc.
> 
> As a matter of fact, I have already designed some databases but would like
> to use mergeant. It just seems neater. Mergeant does for me what I have been
> doing by hand.
> 
> Eventually though, I want to make it possible to create my database from
> my GTK+ code. I don't know whether mergeant has this already. So here is
> my suggestion for mergeant: a feature that does what libglade did to glade.
> Allow the user to save the database tables into an XML file and load their
> structure at runtime so that the whole database structure can be
> instantiated from C code. Perhaps it's already there, not sure.
> As soon as I can get the CVS version to compile I will test it.


Libmergeant (upon which Mergeant is built)has a data dictionnary
(saved in a .xml file with a well defined DTD) for each connection to
a database. Upon loading the XML file, the dictionnary contains a list
of MgDbTable objects which represent the tables described in the XML
file (basically each table is a list of fields and has some
constraints).

The missing code is to translate a MgDbTable object into a SQL
statement to create the table (CREATE TABLE...) or update its
structure (ALTER TABLE...).

I plan to add these features after the merger with libgnomedb: from
what I have understood from your first messages, you want that
feature.

If the feature you want is simply generating the INSERT/UPDATE/DELETE
statements to insert/update/delete data from that table, then
Libmergeant has an object to do that and it already works (the API to
access it will be changed to use the generic GdaDataModel interface).

Cheers,

Vivien



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