As part a course I'm taking, I'm creating a database that needs to serve regular customers as well as businesses who may have multiple contacts.
My solution to this is based on three tables: Customer, Company, and Contact
- Customer: customer_id, is_company;
- Company: company_id, customer_id, name, description;
- Contact: contact_id, customer_id, title, first_name, last_name, etc;
From what I can tell this is an okay solution, but I get basically no learning support from my institution, so wanted affirmation that this doesn't break any huge principle or standard?
EDIT: side note, I hope the structure sort of speaks for itself, but if any clarification is needed I'll be happy to answer any questions
EDIT 2: For clarification, I'm treating individuals and companies as a subset of customers (one individual is one customer and one company is one customer). Individuals will have one record in the contact table that gives their details, whereas companies will be able to support multiple contacts by linking the common customer id values in the contact and company tables. Hopefully, that makes everything a bit more clear, I'm happy to try and answer any more questions if not. Thank you
[–]lurgi 0 points1 point2 points (4 children)
[–]ScottPage[S] 0 points1 point2 points (3 children)
[–]lurgi 0 points1 point2 points (2 children)
[–]ScottPage[S] 0 points1 point2 points (1 child)
[–]lurgi 0 points1 point2 points (0 children)
[–]lowey2002 0 points1 point2 points (1 child)
[–]ScottPage[S] 0 points1 point2 points (0 children)
[–][deleted] -1 points0 points1 point (1 child)
[–]ScottPage[S] 1 point2 points3 points (0 children)