Keys

A key is a set of one or more fields that you use to connect two tables. Usually the keys in a relationship are single fields, but you could use more than one field in a record to link to one or more fields in another table. For instance, you could use the FirstName and LastName fields in two tables to link the tables. The tables might contain many customers with the same first names or the same last names, but only those with the same first and last name would be related.

There are two types of keys: primary and foreign. A primary key defines the relationship in the master or home table. The corresponding key in the related table is a foreign key.

The values for a primary key in a table must always be unique. In other words, no two records ...

Get Visual Basic® .NET Database Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.