Jim Dettman
jimdettman at verizon.net
Wed May 30 16:02:47 CDT 2007
Hi All, Stumbled across something today that I thought I'd pass along in regards to contacts. I have the book "Microsoft SQL Server 2000 Bible" by Paul Nielsen as one of my reference books sitting on the shelf. Happened to notice today one of the sample SQL databases included had a contacts table. Direct quote from a description of the database: "For simplicity, all contacts are merged into a single table and the contact type is signified by flags. A contact can be a customer, employee, or vendor. Customers have a lookup for customer type, which is referenced in determining the discount." Literally he has three bit flag fields in the record to indicate if it is a customer, employee, or vendor contact. It also includes name fields and a company name, so the contact can be a person, a company, or a person at a company. Suffice to say I was quite surprised to see this. BTW, I'm still going back and forth between doing a single table vs one for individuals and one for companies. Even before I had seen the above, I was leaning towards going back to a single table. I'll let you know what approach I finally choose when I get to it and any pitfalls that ensue as a result. Jim.