I have a table product(id, name)
, which contains several groups of products that differ by a model number. i.e. {motor10, motor20, motor30, pipe10, pipe20, pipe30, wrench12, wrench20, etc}.
I chose to create a new table called product category
that contains just the categories, like {motor, pipe, wrench, uncategorized}
Question
For practical purposes in an application (and not for theoretical purposes such as modeling an ER Diagram), should I use identifying or non-identifying relationship?
My Use Case
In my case, I can define it so that a product cannot exist without a category. However, if a product is not yet categorized, it carries uncategorized
value in category. Category can have entries that do not yet have any products assigned to it.
Category is a made-up concept that I do not really have to use, but it will help me with categorizing the sets of products that I currently do have. I think because it is a made up concept, and I am not sure how I want to use it, is why I am struggling with this issue. aka.. I do not have to have table product_category
at all, but it will certainly help me with various product grouping.
Making this an identifying relationship will require me to revamp and rewrite some code, and I wanted to make sure I do want to make this an identifying relationship before I go off and write lots of code.
... that said, would there be a case where I would NOT make this an identifying relationship?