[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Some initial schema thoughts
- Subject: Some initial schema thoughts
- From: "Joshua D. Drake" <..hidden..>
- Date: Sat, 09 Sep 2006 10:24:50 -0700
Hello,
This just covers some general notes about what I see wrong with the
schema. My suggestion only cover nominal changes that in theory would
not effect code:
Ledger-SMB notes:
* All sequences should be moved to proper serial psuedo types when
associated with a single column
* Floats for money values should be numeric(10,2) or possibly (15,2) but
that it getting a bit excessive
* Date fields should always be NOT NULL. Especially date fields like
acc_trans.transdate
* Why is qty in invoice float4? Shouldn't this be numeric?
* customers.curr is set to char... chars uhmmm, are not good :) lets use
varchar(3)
* customers.startdate is this the date the customer started with us?
Should this default to creation date?
* oe.curr is also char(3)... why?
* orderitems is using OIDs, good god why?
I will review further for normalization issues of which there are a ton.
Joshua D. Drake
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/