Primary Key versus Unique Constraint?

前端 未结 16 1931
轮回少年
轮回少年 2020-12-13 03:49

I\'m currently designing a brand new database. In school, we always learned to put a primary key in each table.

I read a lot of articles/discussions/newsgroups posts

16条回答
  •  醉酒成梦
    2020-12-13 04:17

    If you plan on using LINQ-to-SQL, your tables will require Primary Keys if you plan on performing updates, and they will require a timestamp column if you plan on working in a disconnected environment (such as passing an object through a WCF service application).

    If you like .NET, PK's and FK's are your friends.

提交回复
热议问题