Schema
Phillip J Shelton
shelton11@dingoblue.net.au
Wed, 13 Dec 2000 06:42:04 +1000
David Merrill wrote:
> I'm beginning to work on the database schema for an eventual SQL back
> end. I am keeping my notes in an ASCII file, which will always be
> available at http://www.lupercalia.net/schema.txt
some comments and suggestions.
> SPLIT
> -----
> account_guid char 32 ->account.account_guid
> transaction_guid char 21
> ->transaction.transaction_guid
> ^
> Aren't GUIDs 32 bytes?
Um, could you explain GUIDs? I am lost.
> split_guid char 32
> action ???
> memo varchar any notes the user
> enters
> reconciled char 1 Y/N
> damount money does this mean debit
> amount?
It is the smallest amount that this account can change by. GnuCash is
now using a variation on rational numbers which have a numerator, the
value, and a denominator, the damont.
> value money ???
> date_reconciled.tv_sec ???
> date_reconciled.tv_nsec ???
> balance money ??? balance when, of
> what?
> cleared_balance money "
> reconciled_balance money "
> share_balance money "
> share_cleared_balance money "
> share_reconciled_balance money "
Are not these balance's more correctly part of the account?
> kvp_data ???
>
>
>
> TRANSACTION
> -----------
> transaction_guid char 32
> transaction_date date date of event
These need a note field as well.
A transaction is the unit that is entered in the ledger, and the splits
are for which accounts are affected by the transaction. Others will
have a better explanation I am sure.