Anonymous asked in Business & FinanceSmall Business · 8 months ago

How do I implement overlapped specialization in my DB?

In my concetual schema I have a class "Food" which is specialized into "Restaurant", "Pub", "Cafe" etc.

These specializations are overlapped, like a Restaurant can be also a Pub.

How can I do this in my database? I thought 2 ways to implement this:

1) Insert booleans into the class "Food", which are Restaurant, Pub etc, and if set to 1, it indicates which specialization to use

2) Use an enumeration which can assume: "Restaurant", "Pub", "Cafe", "Restaurant&Cafe", "Restaurant&Pub", "Pub&Cafe" , "Restauranr&Pub&Cafe" but i do not like this way very much.

are there other ways?

There are no answers yet.
Be the first to answer this question.