If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > accounting database design help

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-03-10, 03:20
rahulakacyrus rahulakacyrus is offline
Registered User
 
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
accounting database design help-database.png  
Reply With Quote
  #2 (permalink)  
Old 11-03-10, 04:49
dportas dportas is offline
Registered User
 
Join Date: Dec 2007
Location: London, UK
Posts: 732
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.
Reply With Quote
  #3 (permalink)  
Old 11-03-10, 05:01
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
Quote:
Originally Posted by dportas View Post
Why on earth would you want to develop an accounting system?
it's a homework assignment

__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #4 (permalink)  
Old 11-03-10, 17:24
rahulakacyrus rahulakacyrus is offline
Registered User
 
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 ???
Reply With Quote
Reply

Tags
accounts, database, design

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On