Re: [gnome-db] Database Objects
- From: Rodrigo Moya <rodrigo gnome-db org>
- To: Cleber Rodrigues Rosa Junior <cleberrrjr bol com br>
- Cc: GDA <gnome-db-list gnome org>
- Subject: Re: [gnome-db] Database Objects
- Date: 26 Dec 2001 17:49:19 +0100
On Wed, 2001-12-26 at 12:40, Cleber Rodrigues Rosa Junior wrote:
> * Directly manipulating database "objects":
>
> It would be great, at least for me, to be able to manipulate database
> objects (databases, tables, fields, maybe views, maybe stored
> procedures) in a object oriented fashion, similar to the way we deal
> with just about everything in the GDA world. Something like this:
>
...
>
> The GdaDbo prefix stands for "Gda Database Objects" and I chose this
> "namespace" so that it doesn't collide with regular Gda classes. If we
> feel it should collide (integrate, I mean) with gda, I can move them to
> Gda "namespace".
>
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
> * 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
> 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.
> I guess that's a lot to talk about for now. I'm back to coding, thanks
> for your time reading this bull..., hey I think it's not that bad.
>
no, it's not bad, it's very good :-)
cheers
--
Rodrigo Moya <rodrigo gnome-db org> - <rodrigo ximian com>
http://www.gnome-db.org/ - http://www.ximian.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]