T
Tim Johnson
I am designing a database in which customers may or may not be a part of a
company, there may be company orders, but the person that "owns" the orders
may vary, as will the person that receives the bill (to top it all off, they
may not even be the same person).
For customers that do not belong to a company, the solution seems to me to
be a clear and simple one-to-many between customers and orders. Companies to
Orders seems like it should be one to many, as well.
However; the relationships between customers, companies, and orders seems a
bit trickier. I have considered creating a Corporate Contacts table, but
that seems to me to break normalization rules, as it would essentially
contain the same information as customers, and someone's role may shift
between that of a contact and that of a customer.
I have also considered creating a junction table to connect customers to
companies, but that doesn't seem to make a lot of sense, either, as it seem
that the relationship should be many-to-one; not many to many.
Any suggestions?
Thanks in advance,
Tim
company, there may be company orders, but the person that "owns" the orders
may vary, as will the person that receives the bill (to top it all off, they
may not even be the same person).
For customers that do not belong to a company, the solution seems to me to
be a clear and simple one-to-many between customers and orders. Companies to
Orders seems like it should be one to many, as well.
However; the relationships between customers, companies, and orders seems a
bit trickier. I have considered creating a Corporate Contacts table, but
that seems to me to break normalization rules, as it would essentially
contain the same information as customers, and someone's role may shift
between that of a contact and that of a customer.
I have also considered creating a junction table to connect customers to
companies, but that doesn't seem to make a lot of sense, either, as it seem
that the relationship should be many-to-one; not many to many.
Any suggestions?
Thanks in advance,
Tim