Jump to content

Database structure


phppup

Recommended Posts

 

I am creating a database with the personal information of customers at a small business. Many of the customers are local residents, while some are business owners.

For those customers with businesses, the company name and a corporate designation is desired.

For purposes of database normalization, is it really necessary to create a separate table for these two pieces of information.

What is the real downside of having two more rows in a single table?

Helpful information appreciated.

Link to comment
Share on other sites

I'd recommend a separate table, just to future-proof the system. If you add 2 more columns to your clients table that track company name and designation, what happens when you decide to track phone number, and address, as well as display a logo for the company? Create a second table with the company-specific data points you need and JOIN the two during your queries when and where necessary. This will also cut down on the amount of work the server has to do if, for instance, you want to display only company listings.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.