Re: Proposing couchdb-glib and evolution-couchdb for GNOME 2.30



On Thu, 2009-10-01 at 13:48 +0200, Johannes Schmid wrote:
> Hi all!
> 
> Maybe I get this wrong but wouldn't it be easier to access CouchDB from
> libgda database-wrapper that we already have in the external
> dependencies?
> 
well, couchdb is not a relational database, in the sense that a CouchDB
database (what could be treated in libgda as a table) can contain
records with totally different fields, so it can't be easily mapped
1<->1 to a relational table. For instance, for evolution-couchdb, we
have a single database for contacts, but there's nothing preventing
people from putting in that database records containing appointments, or
notes, or whatever.

We have though a special field for all records, called record_type (see
http://www.freedesktop.org/wiki/Specifications/desktopcouch ) which
specifies which type of record it is, so that could be used in libgda
to, for instance, map a CouchDB database to a table containing all
contacts. But again, what do you do with the other records, some of
which might not contain the record_type field?

Also, CouchDB offers some noSQL stuff, like adding attachments to JSON
documents, and has the notion of conflicting documents which you need to
resolve, so mapping that to a relational database might be a hard task.
And also, the couchdb-glib API is straightforward (give me the list of
dbs/documents, update this doc, etc), while making apps use libgda to
access it would be a hard thing to convince maintainers (believe me I
know, I've worked for many years in GNOME-DB, and tried to convince
people to use it :-). This is not to say that libgda is not useful, of
course it is, for applications accessing relational databases (or other
formats easily mapped to relational databases).

I like though the idea of writing a libgda CouchDB backend, but this
could only be mapped to databases containing records with the
record_type field, and with that record_type well documented.



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