O'Reilly logo

Access 2007 Programming by Example with VBA, XML, and ASP by Julitta Korol

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 20Enforcing Data Integrity and Relationships between Tables

When creating tables in a database, you often need to define rules regarding the values allowed in columns (fields). As mentioned in Chapter 19, constraints allow you to enforce integrity by creating rules for a table. The five types of constraints are listed below.

Table 20-1: Table constraints

Constraint Name

Usage

PRIMARY KEY

Identifies the column or set of columns whose values uniquely identify a row in a table.

FOREIGN KEY

Defines the relationship between tables and maintains data integrity when records are being added, changed, or deleted in a table.

UNIQUE

Ensures that no duplicate values are entered in a specific column or combination of columns that is not ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required