O'Reilly logo

Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started by Charlie Arehart, Raymond Camden, Ben Forta

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

Primary and Foreign Keys

Primary key is the database term for the column(s) that contains values that uniquely identify each row. A primary key is usually a single column, but doesn’t have to be.

There are only two requirements for primary keys:

  • Every row must have a value in the primary key. Empty fields, sometimes called null fields, are not allowed.

  • Primary key values can never be duplicated. If two movies were to have the same ID, all relationships would fail. In fact, most database applications prevent you from entering duplicate values in primary key fields.

When you are asked for a list of all expenses sorted by movie, you can instruct the database to build the relationship and retrieve the required data. The movie table is scanned in ...

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