SQL Backend?

Josh Sled jsled at asynchronous.org
Wed Jul 25 09:44:41 EDT 2007


"Albert Lash" <albert.lash at gmail.com> writes:
>> That's right; each backend is basically stand-alone.  Of course it shares a
>> rough outline with the runtime object model and XML data-model, just by
>> nature.
>
> Hmm, I'm a little confused now. The code referenced earlier had to do
> with GDM, right? And GDM was replaced by QOF? Or is it that they two
> are different, QOF is used for managing an XML flat file database, and
> GDM is used for SQL connectivity? I was thinking that QOF could be
> connected to a SQL backend via ODBC or something.

(Not GDM... GDA, the GNOME Data Access layer. :)

QOF is the Query Object Framework.  It is, roughly:

- a C-based object-model like thing (similar to gobject)

- a lot of app utility code (similar to some of glib)

- a facility for constructing queries that can be evaluated over the
  in-memory object graph, or translated into a form appropriate for a backend
  (such as a SQL-speaking relational DB).

- a neutral "backend" layer, allowing a QOF object graph to be persisted
  either because of runtime object-field update events (i.., mutate the
  database bit by bit as things change), or on request (i.e., serialize the
  whole object graph to a file).


We currently have a few backends:

- src/backend/file: the gnucash XML file backend.

- src/backend/postgres/: the historical gnucash PG DB backend.

- src/backend/gda/: the in-development gnucash GDA-based DB backend in
    <http://svn.gnucash.org/repo/gnucash/branches/gda-dev/>.

- lib/libqof/backend/file/: the QOF-provided, application-generic QOF
    Serialization Format (QSF) backend.

- src/backend/dwi/: Linas' DWI/DUI-based backend; not used.


> Here's some links I found helpful in researching XBRL:
[snip]

Thanks for those.


> Is there a basic description of the GnuCash data model around
> anywhere? Is this information only accessible in the code at the
> moment? I've read about the accounts, transactions, and splits, and
> these coincide fairly well with pbooks' accounts, entries,
> entry_amounts, and transactions.

<http://svn.gnucash.org/docs/HEAD/> is the root of nightly-generated runs of
doxygen over the source tree.

<http://svn.gnucash.org/docs/HEAD/group__Engine.html> looks like a good entry
point to talking about the Engine object model.

If you grok XML and Relax-NG, then the XML file schema
<http://svn.gnucash.org/repo/gnucash/trunk/src/doc/xml/gnucash-v2.rnc> might
be useful ... the structure there maps pretty directly to the object model.

-- 
...jsled
http://asynchronous.org/ - a=jsled; b=asynchronous.org; echo ${a}@${b}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20070725/8d12231c/attachment.bin 


More information about the gnucash-devel mailing list