Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2010
    Posts
    2

    Red face accounting database design help

    Hi Everyone,

    I have some trouble with database design..I have tables customers and agents which generate transactions which should be recorded in ledger table.

    Please refer to attachment for the design.
    I cannot get referential integrity between customers/agents and ledger.
    Please propose changes so that I can get up this database working.
    Any accounting+computer expert would be able to solve this!!
    Attached Thumbnails Attached Thumbnails database.png  

  2. #2
    Join Date
    Dec 2007
    Location
    London, UK
    Posts
    741
    Why on earth would you want to develop an accounting system? Save yourself a lot of trouble and expense: go buy one off the shelf.

    Nobody designs a ledger table with separate columns for debits and credits.

    What does "cannot get referential integrity" mean? I can't even see a customers table.

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by dportas View Post
    Why on earth would you want to develop an accounting system?
    it's a homework assignment

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  4. #4
    Join Date
    Nov 2010
    Posts
    2

    database

    Hey,

    Customers in this case is Consignors..
    let me give u some background.
    1.each sale can generate many transactions which will be recorded in ledger.
    2.each purchase can generate many transactions which will be recorded in ledger.
    3.There are other accounts like cash etc that need to be maintained in coa.

    Trouble is:
    Sale and ledger have one to many relationship.
    Purchase and ledger have one to many relationship.

    -->I cant identify which transaction sale/purchase created the journal entry.
    -->If I want to fetch the consignor A/c stats I have to join ledger and ???

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •