Composite primary key

前端 未结 8 1546
旧巷少年郎
旧巷少年郎 2020-12-15 18:37

I am working on the design of a database that will be used to store data that originates from a number of different sources. The instances I am storing are assigned unique I

8条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-15 19:01

    I believe that composite keys create a very natural and descriptive data model. My experience comes from Oracle and I don't think there is any technical issues when creating a composite PK. In fact anyone analysing the data dictionary would immediately understand something about the table. In your case it would be obvious that each source_id must have unique id_on_source.

    The use of natural keys often creates a hot debate, but people whom I work with like natural keys from a good data model perspective.

提交回复
热议问题