Two tables with same columns or one table with additional column?

前端 未结 3 843
清歌不尽
清歌不尽 2021-01-12 04:12

Say I have two tables (Apples and Oranges) with the same columns and just a different table name. Would there be any advantages/disadvantages to turning this into one table

3条回答
  •  隐瞒了意图╮
    2021-01-12 04:45

    If there really is not any further business rules (and resultant underlying data requirements) that separate the two sub-types then I would use one table with an fk to a FruitType lookup table.

    You dont mention what you will be using to access the schema which may affect which approach you take (e.g. if you are using a platform which provides an ORM to your database then this may be worth noting).

提交回复
热议问题