B
B
babyflowercry2018-12-29 16:35:28
Database design
babyflowercry, 2018-12-29 16:35:28

How to implement entities in the database?

Hello
There is a project in which there is an entity "institution". Establishments are different, can be divided into groups: food, entertainment, etc. What is the best way to implement this in the database?
Two options came to mind: one table "institution" with common fields (names, address, category, etc.) and separate tables for each of the categories that expand the main one (i.e. in addition to the table "institution" there will also be a table "institution_food" , in which, for example, there will be a menu field, a foreign key for a record in the main table, etc.). The second option is to consider each category of establishments as a separate entity, i.e. there will be several tables similar to each other, but separate. How from the relational point of view will be more correct to make?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question