What is the purpose of constraint naming

后端 未结 7 1356
栀梦
栀梦 2020-11-28 05:33

What is the purpose of naming your constraints (unique, primary key, foreign key)?

Say I have a table which is using natural keys as a primary key:

C         


        
7条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-28 06:27

    By correctly naming all constraints, You can quickly associate a particular constraint with our data model. This gives us two real advantages:

    1. We can quickly identify and fix any errors.
    2. We can reliably modify or drop constraints.

提交回复
热议问题