Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 659AE2E300C for ; Wed, 6 Feb 2008 23:36:11 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 57353-05 for ; Wed, 6 Feb 2008 23:35:57 -0400 (AST) Received: from starfish.geekisp.com (mail.geekisp.com [216.168.135.169]) by postgresql.org (Postfix) with ESMTP id D806B2E2FC0 for ; Wed, 6 Feb 2008 23:36:06 -0400 (AST) Received: (qmail 16190 invoked by uid 1003); 7 Feb 2008 03:37:33 -0000 Received: from adsl-76-200-128-121.dsl.pltn13.sbcglobal.net (HELO dino-1.misuse.org) (public@misuse.org@76.200.128.121) by mail.geekisp.com with (DHE-RSA-AES256-SHA encrypted) SMTP; 7 Feb 2008 03:37:33 -0000 X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Wed, 06 Feb 2008 19:35:56 -0800 To: "Medi Montaseri" From: Steve Midgley Subject: Re: accounting schema Cc: pgsql-sql@postgresql.org In-Reply-To: <8078a1730802061854m7a7c2129h9e7416453fabfcaf@mail.gmail.co m> References: <20080207011622.390CE2E2F13@postgresql.org> <47aa6e71.07eb300a.345e.ffffca19SMTPIN_ADDED@mx.google.com> <8078a1730802061854m7a7c2129h9e7416453fabfcaf@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Message-Id: <20080207033606.D806B2E2FC0@postgresql.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/51 X-Sequence-Number: 30142 At 06:54 PM 2/6/2008, Medi Montaseri wrote: >Thanks Steve... > >And finally you mentioned that bank accounts are tricky...can you >expand on this please. After all I am under the impression that "bank >accounts" are a corner stone of this whole book keeping...I >mean...bank accounts have debits and credits just like any >account...eg interest earned is a credit and bank fees are >debits...what worries you about bank accounts... > >Thanks guys...this is very very nice > >Medi Hi Medi, We may be well off-topic for Pgsql but it is a modeling issue so I'll reply on-list.. Consider this scenario: You want to track your AP/AR accounts by "business unit" - so you have a Marketing account, Sales account, Engineering account, etc. But let's say you want to keep all the money for all the "units" in only two bank accounts depending on which region the expenses will be paid out from (to reduce processing fees). So you might pay for things accrued by Engineering and Marketing on the West Coast from one bank account and Engineering and Marketing expenses on the East Coast from the other (a US-centric example). So the bank accounts where cash is actually deposited/withdrawn is different from where the money is received or spent from a "logical" perspective in the AR/AP ledgers. This is a simple example and real-world issues become truly horrendous. (For example, try to account for investment instruments like long term property holdings with lines of credit against the real estate). I've always thought that if DBA's existed when Accounting was invented, things would look very, very different. :) Good luck, Steve