Correct Answer : Get Lastest Questions and Answer : Explanation: Following are different variations of primary keys. Please note that COL1, COL2, COL3,a¦ and so on represent columns in the table.
COL1: primary key has only one partition key and no cluster key. (COL1, COL2): column COL1 is a partition key and column COL2 is a cluster key. (COL1,COL2,COL3,): column COL1 is a partition key and columns COL2, COL3 and so on make cluster key. (COL1, (COL2, COL3,)): It is same as 3 i.e column COL1 is a partition key and columns COL2,COL3,a¦ make cluster key. ((COL1, COL2,a¦), (COL3,COL4,a¦)): columns COL1, COL2 make partition key and columns COL3,COL4,a¦ make cluster key.
It is important to note that when compound key is COL1,COL2,COL3 then the first key COL1 becomes partition key and rest of the keys become part of the cluster key. In order to make composite partition keys we have to specify keys in parenthesis such as: ( ( COL1,COL2) , COL3, COL4). In this case COL1 and COL2 are part of partition keys and COL3, COL4 are part of cluster key.
Question : The purpose of partition key is to identify the partition or node in the cluster which stores that row. 1. True 2. False
Correct Answer : Get Lastest Questions and Answer : Explanation: The purpose of partition key is to identify the partition or node in the cluster which stores that row. When data is read or write from the cluster a function called Partitioner is used to compute the hash value of the partition key. This hash value is used to determine the node/partition which contains that row. For example rows whose partition key values range from 11000 to 11234 may reside in node A and rows with partition key values range from 11235 to 12000 may reside in node B . If a row contains partition key whose hash value is 11233 then it will be stored in node A.