Premium

DataStax Cassandra Developer Certification Certification Questions and Answer (Dumps and Practice Questions)



Question : Cassandra database tables always be in rd normal form?
 : Cassandra database tables always be in rd normal form?
1. True
2. False

Correct Answer : Get Lastest Questions and Answer :
Explanation: JOIN is not efficient, especially one of these tables are very big. Hence, it is always preferred
data to be de-normalized in Cassandra world, to have lowest latency.




Question : You have been given below structure of data, with Cassandra datatypes

course_id timeuuid
published_date timestamp
category set
title text
trainer text


Following are the table structure

CREATE TABLE HadoopExam (
course_id timeuuid,
published_date timestamp,
category set,
title text,
trainer text
PRIMARY KEY ( XXXX )
) WITH CLUSTERING ORDER BY ( YYYYY);

Now replace the correct value of XXXX and YYYY, to satisfy the below requirement

Retrieve course a trainer has created in (newest first).


 : You have been given below structure of data, with Cassandra datatypes
1. XXXX=((trainer), published_date, course_id) and YYYY= published_date DESC ,course_id ASC

2. XXXX=((course_id), published_date, trainer) and YYYY= trainer DESC ,course_id ASC

3. Access Mostly Uused Products by 50000+ Subscribers

4. XXXX=((course_id), published_date, trainer) and YYYY= published_date DESC ,course_id DESC

5.


Correct Answer : Get Lastest Questions and Answer :
Explanation: Lets see what is our query requirement

Retrieve course a trainer has created in (newest first).

Retrieve Course
Created by Trainer
Order by newest first

Our criteria is created by trainer. Hence, certainly it would be partition key.
We need order by newest first hence, we need to cluster based on published_date

Hence, our primary key can be ((trainer), published_date). But as we can check these are not unique.
Hence, we need to define uniqueness, so add course_id in primary key ((trainer), published_date, course_id)




Question : You have been given below table definition

CREATE TABLE books_by_category (
category text,
published_date timestamp,
book_id timeuuid,
title text,
PRIMARY KEY ( XXXX)
) WITH CLUSTERING ORDER BY (YYYY );

Now fill in the values in XXXX and YYYY , which satisfies the below query requirement

Retrieve books within a particular category (newest fist).
 : You have been given below table definition
1. XXXX= ((category), book_id, published_date ) and YYYY=published_date DESC , book_id ASC

2. XXXX= ((category), published_date, book_id) and YYYY=published_date DESC , book_id ASC

3. Access Mostly Uused Products by 50000+ Subscribers

4. XXXX= ((category), published_date ) and YYYY=published_date DESC


Correct Answer : Get Lastest Questions and Answer :
Explanation: Lets first look into query

Retrieve books within a particular category (newest fist).

What is the criteria: category?
Order by newest first: published_date

Hence, PRIMARY KEY will be ((category), published_date)
But we need to make primary key unique hence: ((category), published_date, book_id)

And to order by data we need to use cluster columns: published_date DESC , book_id ASC



Related Questions


Question : You can also specify specific IP addresses of Cassandra cluster nodes, so that you will hit to only specific node
in cluster, initially
 : You can also specify specific IP addresses of Cassandra cluster nodes, so that you will hit to only specific node
1. True
2. False


Question : As soon as you create Cluster instance, you are connected to Cassandra cluster
 : As soon as you create Cluster instance, you are connected to Cassandra cluster
1. True
2. False


Question : . You should always prefer to use SSD storage on Cassandra node?
 : . You should always prefer to use SSD storage on Cassandra node?
1. True
2. False


Question : You can use network attached storage and needs to be avoided for Cassandra node ?
 : You can use network attached storage and needs to be avoided for Cassandra node ?
1. True
2. False


Question : Which of the following statements are correct?

A. You can write data on any node in Cassandra cluster
B. Any node in the cluster can work as Coordinator
C. You have to define 1/4 th of total node as Cassandra Cluster
D. Coordinator is optional in Cassandra

 : Which of the following statements are correct?
1. A,B
2. B,C
3. C,D
4. A,D
5. B,D


Question : Using driver you can connect to specific node, for which your data belongs to and you can do read and write only
on that node in Cassandra ring
 : Using driver you can connect to specific node, for which your data belongs to and you can do read and write only
1. True
2. False