![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
FOR PARADOX 8 I'm making a name and address database (no phone) with a dozen fields; there would be about 500 records. The sequence is: Last Name, First Name, Organization, Street, City, etc. Field type is A for all fields. I'm assigning a key to Last Name and First Name; Organization is not a good bet for a duplicate-breaker (thus having a key ) because very few records will use Organization. I could assign a key to Street, but Organization is between First Name and Street, putting Street out of sequence. I could have the sequence as Last Name, First Name, Street, Organization--and assign a key to the first three. The mailing label Expert would allow me to put Street and Organizaiton where they belong for mailing labels. Please comment. |
#3
| |||
| |||
|
|
If you're only going to have 500 records, the three-field key is probably OK, but best practice would be to have a meaningless integer key field with a secondary index on Last Name and First Name, another on Organization, maybe one on State, and possibly others depending on how you're going to use the data. If you're going to have any secondary indexes at all, the compound key you propose could be problematic; I say "could be" because I used compound keys extensively in some of my early Paradox databases w/o too much issue. If you add any tables with relations to your address table, the compound key becomes much more of an issue since you'd need to include all three fields in any other related table. Delbert wrote: FOR PARADOX 8 I'm making a name and address database (no phone) with a dozen fields; there would be about 500 records. The sequence is: Last Name, First Name, Organization, Street, City, etc. Field type is A for all fields. I'm assigning a key to Last Name and First Name; Organization is not a good bet for a duplicate-breaker (thus having a key ) because very few records will use Organization. I could assign a key to Street, but Organization is between First Name and Street, putting Street out of sequence. I could have the sequence as Last Name, First Name, Street, Organization--and assign a key to the first three. The mailing label Expert would allow me to put Street and Organizaiton where they belong for mailing labels. Please comment. |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
"I could assign a key to Street, but Organization is between First Name and Street, putting Street out of sequence." Jeff, would a key field out of sequence work? Jeff Shoaf <jeffshoaf (AT) alltel (DOT) net> wrote: If you're only going to have 500 records, the three-field key is probably OK, but best practice would be to have a meaningless integer key field with a secondary index on Last Name and First Name, another on Organization, maybe one on State, and possibly others depending on how you're going to use the data. If you're going to have any secondary indexes at all, the compound key you propose could be problematic; I say "could be" because I used compound keys extensively in some of my early Paradox databases w/o too much issue. If you add any tables with relations to your address table, the compound key becomes much more of an issue since you'd need to include all three fields in any other related table. Delbert wrote: FOR PARADOX 8 I'm making a name and address database (no phone) with a dozen fields; there would be about 500 records. The sequence is: Last Name, First Name, Organization, Street, City, etc. Field type is A for all fields. I'm assigning a key to Last Name and First Name; Organization is not a good bet for a duplicate-breaker (thus having a key ) because very few records will use Organization. I could assign a key to Street, but Organization is between First Name and Street, putting Street out of sequence. I could have the sequence as Last Name, First Name, Street, Organization--and assign a key to the first three. The mailing label Expert would allow me to put Street and Organizaiton where they belong for mailing labels. Please comment. |
#6
| |||
| |||
|
|
The key must be the first field(s) in the table. I'd recommend using a meaningless integer key. Delbert wrote: "I could assign a key to Street, but Organization is between First Name and Street, putting Street out of sequence." Jeff, would a key field out of sequence work? Jeff Shoaf <jeffshoaf (AT) alltel (DOT) net> wrote: If you're only going to have 500 records, the three-field key is probably OK, but best practice would be to have a meaningless integer key field with a secondary index on Last Name and First Name, another on Organization, maybe one on State, and possibly others depending on how you're going to use the data. If you're going to have any secondary indexes at all, the compound key you propose could be problematic; I say "could be" because I used compound keys extensively in some of my early Paradox databases w/o too much issue. If you add any tables with relations to your address table, the compound key becomes much more of an issue since you'd need to include all three fields in any other related table. Delbert wrote: FOR PARADOX 8 I'm making a name and address database (no phone) with a dozen fields; there would be about 500 records. The sequence is: Last Name, First Name, Organization, Street, City, etc. Field type is A for all fields. I'm assigning a key to Last Name and First Name; Organization is not a good bet for a duplicate-breaker (thus having a key ) because very few records will use Organization. I could assign a key to Street, but Organization is between First Name and Street, putting Street out of sequence. I could have the sequence as Last Name, First Name, Street, Organization--and assign a key to the first three. The mailing label Expert would allow me to put Street and Organizaiton where they belong for mailing labels. Please comment. |
#7
| |||
| |||
|
|
How would "a meaningless integer key" work? Separately, from my previous experience (about 12 years) making mailing labels on the same general database, I never had two identical names, such as John W. Smith. Also, to keep things simple, should there now be two identical John W. Smiths, one of them could be set off with a lack of a period after the W or by some similar inconspicuous trick. Jeff Shoaf <jeffshoaf (AT) alltel (DOT) net> wrote: The key must be the first field(s) in the table. I'd recommend using a meaningless integer key. |
#8
| |||
| |||
|
#9
| |||
| |||
|
|
Using longints allows you to put more than 33,000 people in your database. Ya never know. |
#10
| |||
| |||
|
|
Jim, Using longints allows you to put more than 33,000 people in your database. Ya never know. Sorry for correcting you, Jim, but smallInt's give you up to 32,768 people, and longInt's give you over 2 million. |
|
Jim Moseley |
![]() |
| Thread Tools | |
| Display Modes | |
| |