Question : Cassandra stores an entire row of data on a node by partition key. If you have too much data in a partition and want to spread the data over multiple nodes, use a ________________
Correct Answer : Get Lastest Questions and Answer : Explanation: Cassandra stores an entire row of data on a node by partition key. If you have too much data in a partition and want to spread the data over multiple nodes, use a composite partition key.
Question : You have already defined a table named HADOOPEXAM, now you want to add unique collection of email address for each primary key, which of the following is correct statement 1. ALTER TABLE HADOOPEXAM ADD emails set;
set (Unique Values) list (Duplicate values can be possible) map (Key value pair) In a relational database, to allow users to have multiple email addresses, you create an email_addresses table having a many-to-one (joined) relationship to a useras table. CQL handles the classic multiple email addresses use case, and other use cases, by defining columns as collections. Using the set collection type to solve the multiple email addresses problem is convenient and intuitive.
Which of the following is correct CQL to add new emailid for a training_course 1. ADD VALUE TO TRINING_COURSE IN emails = emails + {'hadoopexam@gmail.com'} WHERE id = 62c36092-82a1-3a00-93d1-46196ee77204 AND course_sequence = 2;
2. UPDATE TRINING_COURSE SET emails = emails + {'hadoopexam@gmail.com'} WHERE id = 62c36092-82a1-3a00-93d1-46196ee77204 AND course_sequence = 2;
4. UPDATE TRINING_COURSE SET emails = {emails, {'hadoopexam@gmail.com'}} WHERE id = 62c36092-82a1-3a00-93d1-46196ee77204 AND course_sequence = 2;
Correct Answer : Get Lastest Questions and Answer : Explanation: Each element of a set, list, or map is internally stored as one Cassandra column. To update a set, use the UPDATE command and the addition (+) operator to add an element or the subtraction (-) operator to remove an element.