Quoting Daniel Espinosa <[EMAIL PROTECTED]>: > I'd checked the SQLite 3, and it doesn't support foreing keys, but > triggers. Then may be in the future, after finish the SQL backend > support in GC, we can create a "gnc-data-server" a la Evolution, in > order to read, insert and update some records in transactions or even > execute reports.
We could.. But that's down the road.. > SQLite supports the CHECK constraint, and may you can add a list of > integers or check if fit in a range of numbers. > > Even the last and trying not to take too much time, at moment, in the > DB engine specific implementation, I leave out the account_type table, > and just leave the ones that the user could use to create his own, > like invoice_type to allow the user to create a custom list of > invoices he want. > > I added the accounts_receivable and accounts_payable, just as a note > to cover in some way, if any want to comment me, I think this is just > a list of transaction_split with just more information, but not sure > becouse they aren't taken in account when GC calculate the Balace. > > Attached you'll find the 0.3 version for the schema. Thanks. I noticed you did not include a number of things I had said in previous emails. I described how to handle Lots and Splits, but you didn't incorporate that. All your XXX_id columns are still integers instead of GUIDs.. I don't think you need a separate namespace table, you can just add a namespace string column to the commodities table. s/clients/customers In the business objects, you don't have all the parameters of the objects. In particular, each of them have not only the object id (GUID), but also the object number (string). A customer has TWO addresses (a billing address and a shipping address).. You'll need to add tables for Tax Tables Basically, look in src/business/business-core/*.h for all the objects. Look in *.c for the QOF definitions -- there you'll get a good idea of what all the various parameters are. You can also look in the business XML files for an idea of how the data are stored. You don't need the "currencies" table -- the invoices and everything else just refers back to commodities (with a constraint that commodities.namespace == "ISO4271"). That's all my comments for now.. You might also want to look at src/backend/postgres/table.m4 for a better idea of how the old Postgres database was laid out.. They DID get a lot of things right. -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 [EMAIL PROTECTED] PGP key available _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel