I'm new to creating databases, and I'm trying to write a small one for a contractor. Say you have a table for customers, how would you layout fields for this since some customers might be companies that only have a company name, and some customers might just be regular people with a first, middle, and last name?
The human brain cannot hold all of the knowledge that exists in this world, but it can hold pointers to that knowledge.
Simplest way will be to define the maximum fileds needed. If you feel there might be first, middle and last names so go on defining three fileds. and put the name for company in the last name filed as it will be the name that each person will surely have. Then base other tables and relations on the customer ID you define for each.
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
Greets,
Here's a program I wrote for adding to data base. See the attachment. I'll send you a copy of the form layout to your email. You will use Wordpad or Microsoft word to view the form. Good Luck
LFJ
Originally posted by DNA7433 I'm new to creating databases, and I'm trying to write a small one for a contractor. Say you have a table for customers, how would you layout fields for this since some customers might be companies that only have a company name, and some customers might just be regular people with a first, middle, and last name?
What I would do is make every company give a contact name and make the company name nullable. This way, every record will have a first, middle, and last name, and only those records that are company records will have a entry for the company name column. This will also help if someone needs to contact a company, they can call and ask for the specific person that caused the creation of the record in the database.
Thanks everybody. LFJ, I actually was having an error when I was binding data to a control and your code helped with that. I found out that when you call Fill(DataSet) it doesn't automatically name the table, but when I was binding it I was using the table name from the database.
The human brain cannot hold all of the knowledge that exists in this world, but it can hold pointers to that knowledge.