Just reading about the fact regarding the upi and nupi index in the ppi table
There are two cases possible:
1. Partition index and primary index are same.
2. Partition index is not the part of PI.
In case 1, it is possible to make primary index as UPI while in case 2 TD wouldn't allow to create such table which has PI as UPI.
Let me explain this with an example.
Suppose a handset manufacturing company provides a product id to one of its handset and and all its attributes are true for 6 months, company changes the attributes(colour,Os version) of product in every 6 month but don't change the product id.
So for a date (e.g. 1 dec 2013), a product id have “A” attributes and for a date (e.g. 1 aug 2014), same product id can have different attributes. Both the entries need to be entered in database.
We can treat product id as primary index and date as partition column. So if we define a UPI on PPI table, I could not enter same product id twice in my database. Because for TD it'll be a unique record
But for me it'll be a different record and it should be entered in the table. That’s why I put a partition on my date, so that I can search the attribute of a particular handset, which has a unique id worldwide, based on date.
In case my PI and partition column are same, table partition will happen based on product id and I wouldn't want duplicate attributes for the same product when I don't have anything else to make a difference between them.
Let me know if I am incorrect and provide you explanation as well.
Just reading about the fact regarding the upi and nupi index in the ppi table
There are two cases possible:
1. Partition index and primary index are same.
2. Partition index is not the part of PI.
In case 1, it is possible to make primary index as UPI while in case 2 TD wouldn't allow to create such table which has PI as UPI.
Let me explain this with an example.
Suppose a handset manufacturing company provides a product id to one of its handset and and all its attributes are true for 6 months, company changes the attributes(colour,Os version) of product in every 6 month but don't change the product id.
So for a date (e.g. 1 dec 2013), a product id have “A” attributes and for a date (e.g. 1 aug 2014), same product id can have different attributes. Both the entries need to be entered in database.
We can treat product id as primary index and date as partition column. So if we define a UPI on PPI table, I could not enter same product id twice in my database. Because for TD it'll be a unique record
But for me it'll be a different record and it should be entered in the table. That’s why I put a partition on my date, so that I can search the attribute of a particular handset, which has a unique id worldwide, based on date.
In case my PI and partition column are same, table partition will happen based on product id and I wouldn't want duplicate attributes for the same product when I don't have anything else to make a difference between them.
Let me know if I am incorrect and provide you explanation as well.