Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 To: Terry Thurber
  
 
 
 Terry Thurber
 Tags
Subject: RE: The "Rule" for Primary Key Fields
Thread ID: 115198 Message ID: 118521 # Views: 43 # Ratings: 0
Version: Not Applicable Category: General VFP Topics
Date: Monday, January 15, 2007 9:56:37 PM         
   


Terry,

If you like the best of both worlds, you can use a RecordID field as your primary key, and an InvoiceNumber, PartNumber, or what ever you want as well. Use the RecordID field as the foreign key field in all of the other tables and now your InvoiceNumber or PartNumber can change and you don't have a problem (other than making sure it is unique.) Give it some thought - disk space is cheap and a "RecordID" integer field only costs four bytes. One more field won't add appreciably to your database size, and it can save you hours of work.

Ken
You shall know the truth - and the truth shall set you free. (John 8:33)



COMPLETE THREAD
The "Rule" for Primary Key Fields Posted by Ken Murphy @ 12/6/2006 12:53:31 AM
RE: The "Rule" for Primary Key Fields Posted by Boudewijn Lutgerink @ 12/6/2006 8:32:13 AM
RE: The "Rule" for Primary Key Fields Posted by Ken Murphy @ 12/6/2006 2:11:55 PM
RE: The "Rule" for Primary Key Fields Posted by Borislav Borissov @ 12/6/2006 8:40:47 AM
RE: The "Rule" for Primary Key Fields Posted by Eric den Doop @ 12/6/2006 9:21:26 AM
RE: The "Rule" for Primary Key Fields Posted by Ken Murphy @ 12/6/2006 2:16:15 PM
RE: The "Rule" for Primary Key Fields Posted by sudhir uppal @ 1/12/2007 5:57:59 AM
RE: The "Rule" for Primary Key Fields Posted by William Sanders @ 1/12/2007 6:11:22 PM
RE: The "Rule" for Primary Key Fields Posted by Ken Murphy @ 1/12/2007 11:33:51 PM
RE: The "Rule" for Primary Key Fields Posted by Jamie Osborn @ 1/13/2007 2:05:07 AM
RE: The "Rule" for Primary Key Fields Posted by Ken Murphy @ 1/13/2007 2:20:51 AM
RE: The "Rule" for Primary Key Fields Posted by William Sanders @ 1/16/2007 9:49:00 PM
RE: The "Rule" for Primary Key Fields Posted by Ken Murphy @ 1/16/2007 10:25:38 PM
RE: The "Rule" for Primary Key Fields Posted by William Sanders @ 1/16/2007 10:25:30 PM
RE: The "Rule" for Primary Key Fields Posted by Terry Thurber @ 1/15/2007 12:41:55 AM
RE: The "Rule" for Primary Key Fields Posted by William Sanders @ 1/16/2007 9:50:14 PM
RE: The "Rule" for Primary Key Fields Posted by Terry Thurber @ 1/17/2007 7:17:35 AM
RE: The "Rule" for Primary Key Fields Posted by William Sanders @ 1/16/2007 9:58:37 PM
RE: The "Rule" for Primary Key Fields Posted by Terry Thurber @ 1/17/2007 7:44:55 AM
RE: The "Rule" for Primary Key Fields Posted by Eric den Doop @ 1/16/2007 10:56:36 PM
RE: The "Rule" for Primary Key Fields Posted by William Sanders @ 1/16/2007 11:20:56 PM
RE: The "Rule" for Primary Key Fields Posted by Terry Thurber @ 1/15/2007 1:29:36 AM
RE: The "Rule" for Primary Key Fields Posted by Ken Murphy @ 1/15/2007 9:56:37 PM
RE: The "Rule" for Primary Key Fields Posted by Mike Yearwood @ 1/18/2007 12:29:44 PM
RE: The "Rule" for Primary Key Fields Posted by Ken Murphy @ 1/18/2007 1:37:31 PM
RE: The "Rule" for Primary Key Fields Posted by Mike Yearwood @ 1/19/2007 1:58:58 AM
RE: The "Rule" for Primary Key Fields Posted by Ken Murphy @ 1/19/2007 3:41:03 PM
RE: The "Rule" for Primary Key Fields Posted by Andy Kramek @ 1/20/2007 7:12:23 PM
RE: The "Rule" for Primary Key Fields Posted by Mike Yearwood @ 1/20/2007 8:05:23 PM
RE: The "Rule" for Primary Key Fields Posted by Andy Kramek @ 1/20/2007 10:32:40 PM
RE: The "Rule" for Primary Key Fields Posted by Mike Yearwood @ 1/21/2007 4:40:22 PM
RE: The "Rule" for Primary Key Fields Posted by Andy Kramek @ 1/21/2007 7:13:22 PM
RE: The "Rule" for Primary Key Fields Posted by tushar @ 1/22/2007 6:02:17 AM
RE: The "Rule" for Primary Key Fields Posted by Andy Kramek @ 1/22/2007 12:15:08 PM
RE: The "Rule" for Primary Key Fields Posted by tushar @ 1/23/2007 8:26:36 AM