Re: Accounting Schema
От | Dave Cramer |
---|---|
Тема | Re: Accounting Schema |
Дата | |
Msg-id | 05e101c0d5c0$53247830$0401a8c0@INSPIRON обсуждение исходный текст |
Ответ на | Web-based Problem/Project tracking system ... (The Hermit Hacker <scrappy@hub.org>) |
Ответы |
Re: Accounting Schema
|
Список | pgsql-general |
Ya, thought of that. I generally prefer to keep my data model consistent. It has some merit though, thanks --dc-- ----- Original Message ----- From: "GH" <grasshacker@over-yonder.net> To: "Dave Cramer" <Dave@micro-automation.net> Cc: <pgsql-general@postgresql.org> Sent: Saturday, May 05, 2001 7:48 PM Subject: Re: [GENERAL] Accounting Schema > On Sat, May 05, 2001 at 07:09:13PM -0400, some SMTP stream spewed forth: > > Hi all, > > > > Can anyone out there with more experience than me give me some hints as to > > how to do accounting tables in a db. The problem I am wrestling with is how > > to represent credits, and debits. > > One way is to identify credits and debits with a transactiontype, and keep > > all of the numbers positive which models the way accountants do it. This > > makes things liking calculating the balance difficult with a sql statement. > > > > Keep in mind that what is in the database and what the user sees do not > have to be the same... > You could store the values in the database as positive or negative > convert them to all positives (with a determined "transaction type") > accordingly for display. > > gh > > > Any hints would be appreciated. > > > > Dave > > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 2: you can get off all lists at once with the unregister command > > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > >
В списке pgsql-general по дате отправления: