SQL backend for GnuCash 2

Derek Atkins warlord at MIT.EDU
Thu Oct 26 10:02:59 EDT 2006


"Daniel Espinosa" <esodan at gmail.com> writes:

>> 1) We don't need an AccountType table.  AccountTypes are not data,
>>    they are encoded in the application.  There's no reason to add
>>    them to the database because they are constants.
>>
>
> If usefull if you want a strong data integrity done by the Database
> server, and if you want to share with others programs (I plan to
> develop some one for the desktop)

You can't get enough data integrity from the database.  For example,
you cannot define the database in a way to enforce balanced transactions.
I also don't care about sharing with other programs.

I /AM/ worried about making sure the SQL code works across multiple
databases (SQLite is primary), and I'm worried about that table, which
really is just a copy of the data in src/engine/Account.h, changing
out from under gnucash and then destroying the data because someone
thought they could change that table.

If you prefer, feel free to make the "account type" an "enum".  But I
still think an 'integer' is sufficient; gnucash already knows what the
account types are.  Keep in mind that there are LOTS of these "enum"
types all throughout the code.

>> 2) You don't need a StockTransaction table.   You should model the
>>    Transaction and Split tables like the current PG backend.
>>
> Please see the version 0.2.

I'll take a look and respond shortly..

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list