BaseNow

 

  Search
   

  Help

Screen shots

Compare editions

Online help

Quick-start videos

System requirements

License agreement

Known issues

  Support

 Forums

Technical support

Feedback

 About the author

 Company

Contact

Privacy policy

  Features

BaseNow architecture

Database tools

BaseNow Agent

Tables and views

SQL Query Builder

Import/export data

  Subscribe

Stay informed about any major changes. Click here to subscribe

 

About relationships in a database

A relationship works by matching data in key fields - usually a field with the same name in both tables. In most cases, these matching fields are the primary key from one table, which provides a unique identifier for each record, and a foreign key in the other table. A foreign key (FK) is a column or combination of columns used to establish and enforce a link between the data in two tables. A link is created between two tables by adding the column or columns that hold one table's primary key values to the other table. This column becomes a foreign key in the second table.

Although the primary purpose of a foreign key is to control the data that can be stored in the foreign key table, it also controls changes to data in the primary key table. The constraint enforces referential integrity by ensuring that changes cannot be made to data in the primary key table if those changes invalidate the link to data in the foreign key table. If an attempt is made to delete the row in a primary key table or to change a primary key value, the action will fail if the deleted or changed primary key value corresponds to a value in the foreign key of another table.

To change or delete a row in a foreign key constraint successfully, you must first either delete the foreign key data in the foreign key table or change the foreign key data in the foreign key table, thereby linking the foreign key to different primary key data.


Related Topics:

How to create relationships between tables

About Relationships Manager

Create or change relationships

Columns

About tables

Indexes and primary keys

[Home] [Download] [Screen Shots] [Details] [Support] [Purchase]

Copyright © 1997-2005 Gate Comm Software. All Rights Reserved.

 

 

News
7/13/2004
COMDLG32.OCX error at startup
6/29/2004
Opening FoxPro and dBase databases
1/11/2024
Version 1.1.7 Relased (1/11/2024)
11/18/2002
Version 1.1.0 Relased (11/16/2002)
10/20/2002
HotFix 1 for Windows XP SP1

Forums
8/10/2024
removing duplicate records
8/8/2024
data validation and BaseNow
1/24/2007
Outlook 2003
1/12/2024
BASENOW AND FOXPRO DATE FORMATS
11/6/2024
Need help in Sybase Anywhere database
10/19/2006
need help! mysql query
6/21/2006
Compare SQl fields
6/8/2024
Error