The Gnucash database?

Mark H. Wood mhwood at ameritech.net
Sat Jul 24 11:33:18 EDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 21 Jul 2004, Linas Vepstas wrote:
[snip]
> Yes, but you cannot load financial information into a text file
> with ease.  This is not a problem with gnucash, this is a
> factual statement about the nature of accounting information
> in general.  Its not flat, and you can boil it down into a flat
> report only if you work hard at it.

I think I finally understand some of the confusion swirling around this
thread.

Financial data certainly are flat.  They have been so for as far back as
I'm aware of anyone keeping financial data.  A ledger is flat.  The
important part of a statement is flat.  They are tables.  You can punch
transaction data into a deck of tab cards.  I've done it.  Before we had
computers, bookkeepers did the same thing with pen and paper (or clay and
a wedgy stylus).  I've done that too.

Financial *reports* are, to a machine, meaningless BLOBs.  When rendered
on a viewing medium they are spatial arrangements of tables and formatted
data from individual rows which are highly meaningful to humans, but
useless for re-input to computers.  But you don't store reports in an
accounting system; you synthesize them when asked.

A complete transaction is representable as a sequence of records, each
record containing a single split.  You wouldn't do that in XML because you
can just create a structure which encapsulates an entire transaction.  To
flatten the structure, you merely invent a unique transaction identifier
which will be appended to each split and write them out.  To import such a
thing from, say, TSV, you group all records having the same transaction-id
and compose a complete transaction structure from the data they contain.
The only missing parts are two mappings:  from input columns to backend
columns, and from input account titles to backend account titles.  Those
go in two other input files.

A ledger is representable as a table of transaction splits grouped by
transaction-id.  The general ledger contains all transactions; account
ledgers can be thought of as views containing only transactions which
contain a reference to the named account.

The account metadata (title, asset/liability/etc. and so on) fit neatly
into another table, if that's the way you want to code it.

All this is representable in tables, and in fact it's fairly sensible to
do so.  And a "flat file" (in the DP sense) is a table.

I get the feeling that some people are reading "flat file" to mean
arbitrary text such as the U.N. Charter or an advertisement for shirts.
Typically that's not at all what it means; for automatic data processing
purposes a "flat file" is rigidly structured and has a precise meaning
amenable to calculation -- it's what ADP used for everything, before
there were DBMSs.

- -- 
Mark H. Wood, radical centrist     OpenPGP ID 876A8B75     mhwood at ameritech.net
No amount of clipart will save dull writing or an uninteresting topic.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/

iD8DBQFBAoFLeziYCIdqi3URAg1yAKCMoj7inD2NJMsT2ISwXCeIwiLv3wCggf57
AGSS4v3lpSVmGBd+sHG3JxE=
=3jO5
-----END PGP SIGNATURE-----


More information about the gnucash-user mailing list