Interesting tree/hierarchical data structure problem

后端 未结 6 899
無奈伤痛
無奈伤痛 2020-12-16 05:24

Colleges have different ways of organizing their departments. Some schools go School -> Term -> Department. Others have steps in between, with the longe

6条回答
  •  温柔的废话
    2020-12-16 05:39

    I suggest you better use a general table, called e.g. Entity which would contain id field and a self-referencing parent field.

    Each relevant table would contain a field pointing to Entity's id (1:1). In a way each table would be a child of the Entity table.

提交回复
热议问题