![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am starting to dig into databases (contra free tables). How do I enforce the PK being unique? What expression do I use for my validation rule? While I am at it, how do I enforce FK being valid? Sincerely, Gene Wirchenko Computerese Irregular Verb Conjugation: I have preferences. You have biases. He/She has prejudices. |
#3
| |||
| |||
|
|
"Gene Wirchenko" <genew (AT) mail (DOT) ocis.net> wrote in message news:3m8ke0dd2b7brnb8s5ievmlfi0poq6n13l (AT) 4ax (DOT) com... I am starting to dig into databases (contra free tables). How do I enforce the PK being unique? What expression do I use for my validation rule? While I am at it, how do I enforce FK being valid? Make an index on the PK and make it a Primary type index. Those must be unique. |
#4
| |||
| |||
|
|
[reordered to chronological] "Fred Taylor" <ftaylor (AT) mvps (DOT) org!REMOVE> wrote: "Gene Wirchenko" <genew (AT) mail (DOT) ocis.net> wrote in message news:3m8ke0dd2b7brnb8s5ievmlfi0poq6n13l (AT) 4ax (DOT) com... I am starting to dig into databases (contra free tables). How do I enforce the PK being unique? What expression do I use for my validation rule? While I am at it, how do I enforce FK being valid? Make an index on the PK and make it a Primary type index. Those must be unique. Thank you. I only looked at the index part of the field tab and missed that other tab. Now what about integrity on FKs (foreign keys)? Sincerely, Gene Wirchenko Computerese Irregular Verb Conjugation: I have preferences. You have biases. He/She has prejudices. |
#5
| |||
| |||
|
|
"Gene Wirchenko" <genew (AT) mail (DOT) ocis.net> wrote in message news:1cfke0lnt1o4nmkl7p3c20pokpr1ft6i89 (AT) 4ax (DOT) com... |
|
Now what about integrity on FKs (foreign keys)? A stored procedure that opens the parent table if needed and then does a Seek(). |
#6
| |||
| |||
|
|
I am starting to dig into databases (contra free tables). How do I enforce the PK being unique? What expression do I use for my validation rule? While I am at it, how do I enforce FK being valid? Sincerely, Gene Wirchenko Computerese Irregular Verb Conjugation: I have preferences. You have biases. He/She has prejudices. |
#7
| |||
| |||
|
|
I am starting to dig into databases (contra free tables). How do I enforce the PK being unique? What expression do I use for my validation rule? While I am at it, how do I enforce FK being valid? Sincerely, Gene Wirchenko Computerese Irregular Verb Conjugation: I have preferences. You have biases. He/She has prejudices. |
#8
| |||
| |||
|
|
I am starting to dig into databases (contra free tables). How do I enforce the PK being unique? What expression do I use for my validation rule? While I am at it, how do I enforce FK being valid? Sincerely, Gene Wirchenko Computerese Irregular Verb Conjugation: I have preferences. You have biases. He/She has prejudices. |
#9
| |||
| |||
|
|
Gene ? and Primary Keys ? in most of my existentence in this realm - the two don't fit into a Venn diagram . |
|
U | +-----+ +-----+ | | A | | B | | | | | | | +-----+ +-----+ | | +-----------------------+ |
|
but - in the meantime [big boy] - look for newid() function in the classlibs for 6/7/8/9 and go forth . -- PS - welcome to the database container . |
#10
| |||
| |||
|
|
Will this help? http://www.craigberntson.com/Articles/kb006.htm |
![]() |
| Thread Tools | |
| Display Modes | |
| |