Polymorphism in SQL database tables?

前端 未结 7 1184
悲&欢浪女
悲&欢浪女 2020-11-27 02:39

I currently have multiple tables in my database which consist of the same \'basic fields\' like:

name character varying(100),
description text,
url character         


        
7条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-27 03:18

    You could create one table with the main fields plus a uid then extension tables with the same uid for each specific case. To query these like separate tables you could create views.

提交回复
热议问题