Premium

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



Question : You have defined a table as below

CREATE TABLE TRINING_COURSE (
id uuid,
course_sequence int,
course_id uuid,
title text,
category text,
trainer text,
PRIMARY KEY (id, course_sequence ) );

ALTER TABLE TRINING_COURSE ADD LOCATION map;

Which of the following is correct CQL to add new location for a training_course ?
 : You have defined a table as below
1. INSERT INTO TRINING_COURSE (id, course_sequence, LOCATION)
VALUES (62c36092-82a1-3a00-93d1-46196ee77204, 4,
{ '2017-9-22 09:00' : 'MUMBAI',
'2017-10-1 09:00' : 'CHENNAI'});


2. UPDATE TRINING_COURSE SET LOCATION = LOCATION + {'2017-9-22 09:00' : 'MUMBAI'}
WHERE id = 62c36092-82a1-3a00-93d1-46196ee77204 AND course_sequence = 4;


3. Access Mostly Uused Products by 50000+ Subscribers
WHERE id = 62c36092-82a1-3a00-93d1-46196ee77204 AND course_sequence = 4;


4. UPDATE TRINING_COURSE ADD {LOCATION + {'2017-9-22 09:00' : 'MUMBAI'}}
WHERE id = 62c36092-82a1-3a00-93d1-46196ee77204 AND course_sequence = 4;


Correct Answer : Get Lastest Questions and Answer :
Explanation: To update a map, use INSERT to specify the data in a map collection.

INSERT INTO TRINING_COURSE (id, course_sequence, LOCATION)
VALUES (62c36092-82a1-3a00-93d1-46196ee77204, 4,
{ '2017-9-22 09:00' : 'MUMBAI',
'2017-10-1 09:00' : 'CHENNAI'});

Note : Inserting data into the map replaces the entire map.





Question : You have following table definition

CREATE TABLE TRINING_COURSE (
id uuid,
course_sequence int,
course_id uuid,
title text,
category text,
trainer text,
PRIMARY KEY (id, course_sequence ) );

ALTER TABLE TRINING_COURSE ADD LOCATION map;
ALTER TABLE TRINING_COURSE ADD emails set;

Which of the following will be a correct syntax ?
 : You have following table definition
1. CREATE INDEX EMAIL_INDEX ON TRINING_COURSE (emails);

2. CREATE INDEX ON TRINING_COURSE (emails);

3. Access Mostly Uused Products by 50000+ Subscribers

4. 1 and 2

5. 1,2 and 3


Correct Answer : Get Lastest Questions and Answer :
Explanation: : In Apache Cassandra 2.1 and later, you can index collections and query the database to find a
collection containing a particular value. Continuing with the music service example, suppose you want to find songs tagged
blues and that debuted at the Fillmore. Index the tags set and venue map. Query for values in the tags set and the venue map,
as shown in the next section.

CREATE INDEX ON playlists (tags);
CREATE INDEX mymapvalues ON playlists (venue);
Specifying a name for the index, such as mymapindex, is optional.





Question : You have following table definition

CREATE TABLE TRINING_COURSE (
id uuid,
course_sequence int,
course_id uuid,
title text,
category text,
trainer text,
PRIMARY KEY (id, course_sequence ) );

ALTER TABLE TRINING_COURSE ADD LOCATION map;
ALTER TABLE TRINING_COURSE ADD emails set;

And you also apply the following CQL

CREATE INDEX ON TRINING_COURSE (LOCATION);

Which of the following statement is correct with regards to above query ?
 : You have following table definition
1. It will create an index on LOCATION maps values part

2. It will create an index on LOCATION maps Keys part

3. Access Mostly Uused Products by 50000+ Subscribers

4. This command will fail


Correct Answer : Get Lastest Questions and Answer :
Explanation: It will create an Index to value part of collection. There are different syntax to index key part.


Related Questions


Question : Freshman, Sophomore, Junior, Senior are disjoint sets, and in this case covers, too.
 : Freshman, Sophomore, Junior, Senior are disjoint sets, and in this case covers, too.
1. True
2. False


Question : Employee is not disjoint


 : Employee is not disjoint
1. True
2. False



Question : Select all the features provided by Cassandra, from below list.
A. Cassandra is a partitioned row store database
B. Automatic data distribution: Cassandra provides automatic data distribution across all nodes that participate in a ring or
database cluster.
C. Built-in and customizable replication: Cassandra also provides built-in and customizable replication, which stores
redundant copies of data across nodes that participate in a Cassandra ring.
D. Cassandra supplies linear scalability

 : Select all the features provided by Cassandra, from below list.
1. A,B,C
2. B,C,D
3. A,C,D
4. A,B,C,D


Question : Select correct statement for Cassandra database, w.r.t. RDBMS
A. Cassandra is designed as a distributed database with peer-to-peer communication.
B. As a best practice, queries should involve at least two table.
C. Data should be de-normalized.
D. client-side joins can be used in applications, after data fetch from Cassandra.

 : Select correct statement for Cassandra database, w.r.t. RDBMS
1. A,B,C
2. B,C,D
3. A,C,D
4. A,B,C,D


Question : Select correct statement which applies for CQL.
A. CQL and SQL share the same abstract idea of a table constructed of columns and rows.
B. Cassandra emphasizes denormalization through CQL features like collections and clustering specified at the schema level
C. Cassandra does not support joins.
D. Cassandra does not support subqueries.

 : Select correct statement which applies for CQL.
1. A,B,C
2. B,C,D
3. A,C,D
4. A,B,C,D


Question : Which all are possible using cqlsh
A. you can create keyspaces
B. you can create tables
C. you can insert and query tables

 : Which all are possible using cqlsh
1. A,B
2. B,C
3. A,C
4. A,B,C