All Forums Database
young 14 posts Joined 03/06
12 Apr 2006
question on TD partition, need help!

If the partitioning columns are not part of the Primary Index, the Primary Index cannot be unique (e.g., Location_Number). To maintain uniqueness on the Primary Index, we can create a USI on the PI (e.g., Employee_Number).the PI value is not unique, how come we can define unique SI on it? a little confused...

TDUser-781 35 posts Joined 12/04
13 Apr 2006

Hi Young,you're right: if your Primary Index is defined as not unique (but its values ARE unique), in order to ensure uniqueness you may use a USI.But you write "PI value is not unique".... I probably don't understand your questin but you are not the only one to be confused.... :-) if the PI VALUES are not unique you CAN'T define a USI on these columns....Could you please explain your problem more clearly?Let me know if you need further assistanceBye,TDUser

young 14 posts Joined 03/06
13 Apr 2006

thanks for your fast reply..my question is that PI is not unique, so there existing some records with same PI values, the values are not unique, how can we define unique SI on these duplicate values?my understanding is in fact PI values are unique, but we need Partition, so we define PI Non unique when we created the table, and then we define USI on this PI, right?

TDUser-781 35 posts Joined 12/04
13 Apr 2006

If:1. the values of your PI are unique2. the partitioning column isn't part of your PIthen you can define a USI on these columns.Then you're right!TDUser

young 14 posts Joined 03/06
14 Apr 2006

thanks

You must sign in to leave a comment.