Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
tannert
Starting Member
1 Post |
Posted - 2011-06-15 : 03:48:16
|
I'm sure this scenario will be pretty simple for someone here,.....I am designing an application to help in the day-to-day running of my service business.I will be tracking employees, clients, service tickets, client IT assets, problems & solutions as well as creating and tracking invoices.I plan to have this be client/server based and possibly exposed as a web service in the future.Here is my main issue.Some clients are residential, some are business.Business clients can have multiple contacts, often associated with different IT assets (Jane may be the contact for a printer but John may be the contact for the server).The object-oriented programmer in me says to create a clients table that just tracks clientID, and a boolean value that says weather they are a business or not.Then I would have tables for businesses as well, and then what,... contacts (some of which could be clients some of which could be tied to a business),....or should I keep them all separate and have one table for residential clients and one for business clients and then another for business contacts?Or some other design?Any help/suggestions would be appreciated. |
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-06-15 : 05:11:09
|
Client - id, name, Type(business,residential), AddressContact - Client_id, Name, Type(default,secondary,server,printer), relationship(owner,employee,third party,wife,son)...From what you say the only difference between business and residential is that a business can have multiple contacts - just define one as the default or prime and it means there is no real difference between business and residential just that the residential isn't allowed multiple contacts (except that it probably will need it, don't we all provide free services for friends?)==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
|
|
|
|
|