>As a general rule you should NEVER have primary keys on dependant data in a table, For Primary keys I always generate a URN type Field ( unique reference number) and other indexes are just Regular type not primary , candidiate or unique
>duplicate table data in a primary key will cause table updates to fail with the error uniqueness of index is violated...
Colin,
I agree with your general rule, except general rules generally :) don't have the word NEVER in them. There are exceptions, and my intent here is not to open up the surrogate key can of worms *grin*.
If I read your suggestion correctly, you are saying that his secondary index would be a regular index, not a candidate index. I don't see that solves his problem. He wants to enforce uniqueness of the po_num + line_num combination, and wishes to do that through the index. Certainly using a candidate index is a valid method of doing that.
Just my $.02,
Steve Gibson