How to setup relationships in contact Database
Posted
by
Walt
on Stack Overflow
See other posts from Stack Overflow
or by Walt
Published on 2012-06-05T16:34:05Z
Indexed on
2012/06/05
16:40 UTC
Read the original article
Hit count: 270
I am currently embarking on a new venture to learn PHP and MySQL. I have done some simple databases in the past using Access, but this one is to be a web-centric database for tracking a myriad of data including contacts and project information. I will need to link the various tables in various relationships, and I am not sure the best way to do that. Since I am just starting out with PHP/MySQL I am researching online sources for learning as much as possible. If anyone has recommendations on books or websites, I would appreciate it.
In setting up my tables, one major area that I am concerned with is contacts. I will have a variety of contacts that include: employees, clients, vendors, subcontractors, etc.. and a single contact can be multiple types and each type would have various additional fields that pertain to them. My thought was to have one contacts table that links to other tables for the various contact types. I'm not sure which field type or setup of table options are best... Thoughts?
This scenario will likely play out in other areas of the database as well for projects and products.
Any pointers/direction would be appreciated.
WES
© Stack Overflow or respective owner