Customers and suppliers database design issue
Posted
by hectorsq
on Stack Overflow
See other posts from Stack Overflow
or by hectorsq
Published on 2009-04-13T18:19:35Z
Indexed on
2010/05/29
7:12 UTC
Read the original article
Hit count: 171
database-design
I am developing a web application in which I will have customers and suppliers.
Initially I thought on using a Customers table and a Suppliers table.
Then when I was thinking on bank transactions, I noticed that each transaction needs to refer to a customer or a supplier, so I thought on using a single table named Business in which I will save both customers and suppliers.
If I use Customers and Suppliers tables when I want to list the bank transactions I will have to search in both tables to get the company name.
If I use a Businesses table I will have to use a business type column, and have the union of possible fields for all businesses types.
Any suggestions on the design?
© Stack Overflow or respective owner