Correct Answer : Get Lastest Questions and Answer : Explanation: It’s many to many relationship, also we have equality access pattern so user_name will be partition key. To uniquely identify many to many relationship, we have to use both entity key as well as relationship key.
Question : You have been given below conceptual data model for HadoopExam Inc online training institute.
Please find the correct query for given access pattern
where user_name = ? and comment_daye>?(All the comments by a user_name)
Correct Answer : Get Lastest Questions and Answer : Explanation: It’s many to many relationship, also we have equality access pattern so user_name will be partition key. To uniquely identify many to many relationship, we have to use both entity key as well as relationship key.
However, here we have inequality operator for the comment_date column, hence it should be first clustering column.
Question : You have been given below relationship for the HadoopExam Inc employee
Now find the correct table design for given query access pattern?
Correct Answer : Get Lastest Questions and Answer : Explanation: Here this is a disjoint relationship, contract employee and permanent employee are mutually exclusive and can not be both. Employee_id uniquely identify each employee. We have added one extra column which represent type if employee.