question on TD partition, need help!

Database
Enthusiast

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...
4 REPLIES
Enthusiast

Re: question on TD partition, need help!

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 assistance

Bye,
TDUser

Enthusiast

Re: question on TD partition, need help!

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?
Enthusiast

Re: question on TD partition, need help!

If:
1. the values of your PI are unique
2. the partitioning column isn't part of your PI

then you can define a USI on these columns.

Then you're right!
TDUser
Enthusiast

Re: question on TD partition, need help!

thanks