Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 1C1642E30DB for ; Wed, 6 Feb 2008 22:35:33 -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 61915-05 for ; Wed, 6 Feb 2008 22:35:20 -0400 (AST) Received: from starfish.geekisp.com (mail.geekisp.com [216.168.135.169]) by postgresql.org (Postfix) with ESMTP id 02B422E2F24 for ; Wed, 6 Feb 2008 22:35:28 -0400 (AST) Received: (qmail 1602 invoked by uid 1003); 7 Feb 2008 02:36:55 -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 02:36:55 -0000 X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Wed, 06 Feb 2008 18:35:21 -0800 To: pgsql-sql@postgresql.org From: Steve Midgley Subject: Re: accounting schema Cc: "Medi Montaseri" In-Reply-To: <20080207011622.390CE2E2F13@postgresql.org> References: <20080207011622.390CE2E2F13@postgresql.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Message-Id: <20080207023529.02B422E2F24@postgresql.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/48 X-Sequence-Number: 30139 At 05:09 PM 2/6/2008, pgsql-sql-owner@postgresql.org wrote: >Date: Wed, 6 Feb 2008 17:08:54 -0800 >From: "Medi Montaseri" >To: pgsql-sql@postgresql.org >Subject: accounting schema >Message-ID: ><8078a1730802061708q17c72234xe61be822459a24a8@mail.gmail.com> > >Hi, > >I am learning my way into Accounting and was wondering how Accounting >applications are designed. perhaps you could point the way.... > >On one hand, accountants talk about a sacret equation A = L + OE >(Asset = >Libility + Owner Equity) and then under each categories there are one >or >many account. On the other hand a DBA thinks in terms of tables and >relations. Instead of getting theoritical, allow me to setup an >example Hi Medi, You might read some source code and docs for open source accounting software and see "how it's done." Here's one example that might be interesting and simple enough to follow: http://www.gnucash.org/ In general, I think there are many different accounting methods, so you have to get clear about which one you're using. "Double-entry" accounting is common. Cash vs. accrual posting methods matter (i.e. when does an expense or receivable "charge" against the assets balance?) My most basic understanding is that in general you track assets as they come in, to an "Accounts Receivable" ledger (i.e. table) and liabilities to an "Accounts Payable" ledger. Then you reconcile these two "books" into a "General Ledger" table which gives you something like an audit trail of all activity (and a running balance). I'm sure Wikipedia will define these three terms and lots more with greater clarity. But my (limited) experience with accounting schema is that they often involve these three tables (AR/AP/GL) at their core. As you add bank accounts, complex investment instruments, depreciation etc, things get considerably more complex of course. I'll readily admit my limited experience, and I'm sure others on this list have far better information. I hope this gets you started anyway. Sincerely, Steve