还将ID列标识为表的主键。
You've also identified the id column as the table's primary key.
数据库为一个表格的主键生成值(通过扩展,为相关表生成外主键),从而将程序从这项任务的重担中解放出来。
Having the database generate values for the primary key for a table (and by extension, any foreign key values for related tables) eliminates the burden from the application from having to do so.
Find方法会查询你的Employee表中的记录,看谁的主键值为18。
The find method will query your Employees table for the record whose primary key is 18.
为每个相关属性的集合创建一个单独的表,并为每个表指定一个主键。每列最多包含一个来自其属性域的值。
Make a separate table for each set of related attributes, and give each table a primary key. Each field contains at most one value from its attribute domain.
如果数据库中有一个未设置主键的表,那么实体数据模型工具会尝试为相应的实体推断一个键。
If the database has a table without a primary key, the entity data Model tools try to infer a key for the corresponding entity.
如果为数据库中的某个表定义了主键,则可将该表与其他表相关,从而减少对冗余数据的需要。
If you define a primary key for a table in your database, you can relate that table to other tables, thus reducing the need for redundant data.
如果为数据库中的某个表定义了主键,则可将该表与其他表相关,从而减少对冗余数据的需要。
If you define a primary key for a table in your database, you can relate that table to other tables, thus reducing the need for redundant data.
应用推荐