Soft Technology Classroom: database - the primary key (PrimaryKey)

    A primary key that uniquely identifies each data row in the table. There will be no column to duplicate values ​​as a primary key. A table can not have a primary key, but it will be very difficult to handle, so there is no special reason to have to set the primary key table

    There are two primary key selection strategy: natural key and a logical primary key. Natural key is to use the field have business sense of a primary key, such as identity card number, bank account number; logical primary key is not any business sense to use a primary key field, to complete the program look, the salesman will not see the data. Because it is difficult to ensure the natural key does not repeat (repeat ID number), does not change (account l-bit), it is recommended to use logical primary key.

--www.sysoft.net.cn---

Guess you like

Origin www.cnblogs.com/sysoft/p/11416326.html