MySQL Forums
Forum List  »  Newbie

Re: structuring advice
Posted by: Barry Galbraith
Date: September 19, 2016 07:08PM

You need to read up on "normalization".
One value per column per row.

You have:
People
Companies
They get a table each, with one person per row in the people table, with each persons individual info in that row.
Same for companies.

Then you would have a table linking people to companies, one row per person per company. So a person could (and would) have more than one row.
On row per person per associate (who is also a person!).

Companies have people (employees) so you need a table holding one row per company per employee.

And so on.

Finding what you want then becomes a matter of querying your tables with joins to filter on the information you want about a person, or a company and so on.


You can read about database design here
http://artfulsoftware.com/mysqlbook/sampler/mysqled1ch05.pdf

Good luck,
Barry.

Options: ReplyQuote


Subject
Written By
Posted
September 19, 2016 04:19PM
Re: structuring advice
September 19, 2016 07:08PM
September 19, 2016 07:16PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.