The University of Texas at Austin
Skip to page content.
Information Technology Services
|
|
|
||
About ITS ITS Services Contact ITS ITS Departments ITS Employment ITS News ITS Help Desk
|
|
|
|

| | | | |
|
| header |
|
Introduction to Data Modeling
|
|

Introduction

Data Modeling
  Overview
  E-R Model
  Database Design
  Data Objects
  Basic Schema
  Refining the E-R
  Primary Keys
  Attributes
  Hierarchies
  Integrity Rules
  Bibliography

Relational Model
  Overview
  Data Structure
  Notation
  Relational Table
  Relationships
  Data Integrity
  Relational Data
  Normalization
  Advanced

 

|

Relationships and Keys

A relationship is an association between two or more tables. Relationships are expressed in the data values of the primary and foreign keys.

A primary key is a column or columns in a table whose values uniquely identify each row in a table. A foreign key is a column or columns whose values are the same as the primary key of another table. You can think of a foreign key as a copy of primary key from another relational table. The relationship is made between two relational tables by matching the values of the foreign key in one table with the values of the primary key in another.

Keys are fundamental to the concept of relational databases because they enable tables in the database to be related with each other. Navigation around a relational database depends on the ability of the primary key to unambiguously identify specific rows of a table. Navigating between tables requires that the foreign key is able to correctly and consistently reference the values of the primary keys of a related table. For example, the figure below shows how the keys in the relational tables are used to navigate from AUTHOR to TITLE to PUBLISHER. AUTHOR_TITLE is an all key table used to link AUTHOR and TITLE. This relational table is required because AUTHOR and TITLE have a many-to-many relationship.


 

|
UTOPIA logo

Information Technology Services. Infrastructure. Innovation. Integrity.

Last updated February 29, 2004.
Copyright © 1994-2009, Information Technology Services at The University of Texas at Austin.
All rights reserved. For privacy concerns read our privacy policy.

To submit questions or comments regarding this page, use the online Comment Form.