I have table of customer and table of policies and table of coverage.
- Each customer have 1 or more policies
- Each policy have 1 customer
- each policy have 1 or more coverage and each coverage appear in 1 or more policies
My problem is when I have policy with multiples coverage I don't know how to implement it in the schema so when I open policy I want the ability to add multiple coverage to my policy.
How the schema will look like?
Best regards to all
From my point of view, it is simpler to show than explain. This is Oracle syntax, but never mind that. I used only necessary primary and foreign key columns, just to illustrate the problem.
Customer is simple:
Policy has a foreign key constraint that points to
customer
:Coverage is also simple:
This is what bothers you: how to store policies with multiple coverages - in a separate table! whose columns make foreign key constraints, pointing to appropriate tables, while its primary key is composite & made up of both columns: