Re: [gnome-db] Database Objects



> yes, absolutely. But, instead of using a GdaDbo namespace and add new
> classes, this should all be done by GdaXmlDatabase, whose purpose is to
> serve as export/import format, but that can be easily extended to add
> what you talk about.
> In fact, it's similar to what I intended to do with the GdaXmlDatabase,
> although this is not reflected in the current GdaXmlDatabase code, which
> is just a quick hack.
> 
> Having GdaXmlDatabase reworked/extended to support its original purpose
> (import/export file format) and your ideas seems a very very nice thing
> to me. For instance:
> 
> gda_xml_database_update_connection (xmldb, cnc);
> 
> will copy the XML database into an open connection. The same could be
> made on the other way:
> 
> xmldb = gda_xml_database_new_from_connection (cnc);
> 
> Doing this, by the way, will not only save us from adding new classes,
> but it will also let us get rid of GdaExport and GdaImport, whose
> features could be easily done via these GdaXmlDatabase methods

Ok then. So it means that functions ending in [from|to]_connection
actually manipulate the underlying database, wheter the other functions
only mess with the xml file, right?

> > * Enhanced XML Database format:
> > 
> > The Gda XML Database format is a very powerful tool in database
> > application development. It could become even more powerful if it
> > contained more metadata.
> > 
> > For example, consider a imaginary 'gda-xmldb-install' tool, that could
> > be implemented, in terms of GdaDbo, something like this:
> > 
> > 
> > 	/* let the user choose the what provider to use, defaulting with the
> > "favorite_provider" */
> > 
> > 	/* set up connection, then... */
> > 	GdaDboDatabase *db;
> > 
> > 	db = gda_dbo_database_new_from_file (connection, "/path/to/xmldb")
> > 
> > 	gda_dbo_database_update (db);
> > 
> > gda-xmldb-install could be called at application install time, setting
> > up a gda datasource, AND the underlying database. Mininum trouble and
> > fuss to the end user.
> > 
> yes, also very nice. Thus you could easily setup your starting databases
> at application install time. Although I would prefer this to be
> gda-export/gda-import, so that we've got the 2 generic tools that can be
> used for everything

Better than my idea. gda-export/gda-import will definitly happen.

> 
> > The xmldb format also lacks descriptive information on database, tables,
> > and even fields. This metadata being present and with I18N support would
> > ease the development of data editing GUI. Take a look at the attached
> > xmldb file. A GnomeDb class could read this this info and present a nice
> > GUI.
> >
> yes, as the GdaXmlDatabase, the XML format is a quick hack, so feel free
> to add anything you find worth to be added.

I18N related: should we allow the user to choose what in language to
get/set the descriptive information or just respect the default locale
setting?

I mean, should we go with: 

(I) - gda_xml_database_set_short_description (GdaXmlDatabase *xmldb,
const gchar *user_input);

or

(II) - gda_xml_databse_set_short_description (GdaXmlDatabase *xmldb,
const gchar *user_input, const gchar *language);

One other thing: would 'inttools' be anyhow useful in xmldb files?

Cheers.




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