0% found this document useful (0 votes)
72 views67 pages

Cassandra

The Cassandra Certification Workshop provides information on certification options, resources, and steps to achieve certification, including practice for DS201, DS210, and DS220. It outlines the target audience for each certification and offers links to training materials and community forums. The document also includes examples of CQL statements and queries relevant to the certification exams.

Uploaded by

asif ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views67 pages

Cassandra

The Cassandra Certification Workshop provides information on certification options, resources, and steps to achieve certification, including practice for DS201, DS210, and DS220. It outlines the target audience for each certification and offers links to training materials and community forums. The document also includes examples of CQL statements and queries relevant to the certification exams.

Uploaded by

asif ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

Cassandra Certification Workshop

menti.com
https://github.com/DataStax-Academy
/workshop-cassandra-certification
Cassandra Certification Workshop

1. Which certification and what resources?

2. Steps for certification

3. DS201 (Foundation) practice

4. DS210 (Admin) practice

5. DS220 (Data Modeling) practice

6. Resources
Cassandra Certification Workshop

1. Which certification and what resources?

2. Steps for certification

3. DS201 (Foundation) practice

4. DS210 (Admin) practice

5. DS220 (Data Modeling) practice

6. Resources
Which certification should I get?
Designed for professionals who Designed for professionals that
install, configure, manage and use Apache Cassandra clusters
tune the performance of Apache to manage data
Cassandra clusters
application developers
database administrators data architects
DevOps engineers database designers
Site Reliability Engineers (SREs) database administrators
What resources do I have?
Web: www.datastax.com/dev/certifications

Github: DataStax-Academy/workshop-cassandra-certification Training: academy.datastax.com


Forum: community.datastax.com Chat: bit.ly/cassandra-workshop

Discord
Cassandra Certification Workshop

1. Which certification and what resources?

2. Steps for certification

3. DS201 (Foundation) practice

4. DS210 (Admin) practice

5. DS220 (Data Modeling) practice

6. Resources
Step 1

Go to
https://www.datastax.com/dev/certifications,
read through the material, and take special
note of the Exam Rules and Process section.

Exams are proctored.


Step 2

Choose a learning path,


either the
Administrator Certification or the
Developer Certification.
Step 3

Go to DataStax Academy and sign up if


you have not already done so. Academy
is FREE along with all of the course
content.
Step 4

Based on the learning path you've


chosen complete the course material
within Academy.

These links are provided for you in


DS201 & DS210 the Learning Paths section at DS201 & DS220

https://www.datastax.com/dev/certifications
Step 5

Get your exam voucher.

Complete a learning path and


email [email protected].

OR
Step 5

Create an Astra database per instructions from:

https://github.com/DataStax-Academy/workshop
-crud-with-python-and-node

Using the same email you registered to eventbrite


Step 6

Take your exam.

Don’t forget to roc

Full details are at


https://github.com/DataStax-Academy/workshop-
cassandra-certification
Demo the process
Cassandra Certification Workshop

1. Which certification and what resources?

2. Steps for certification

3. DS201 (Foundation) practice

4. DS210 (Admin) practice

5. DS220 (Data Modeling) practice

6. Resources
1. CQL - Developer and Administrator Exams (DS201)
Consider the CQL statements: How many rows will the roller_coasters table have after
CREATE TABLE roller_coasters ( executing all the CQL statements?
name TEXT,
A. none
park TEXT,
rating INT, B. 2
PRIMARY KEY((name))
); C. 3

D. 4
INSERT INTO roller_coasters (name, park, rating)
VALUES ('Millenium Force', 'Cedar Point', 8 );

INSERT INTO roller_coasters (name, park, rating)


VALUES ('Formula Rossa', 'Ferrari World', 9 );

INSERT INTO roller_coasters (name, park, rating)


VALUES ('Steel Dragon 2000', 'Nagashima Spa Land', 10 );

INSERT INTO roller_coasters (name, park, rating)


VALUES ('Millenium Force', 'Cedar Point', 7 );
1. Solution
Consider the CQL statements: How many rows will the roller_coasters table have after
CREATE TABLE roller_coasters ( executing all the CQL statements?
name TEXT,
A. none
park TEXT,
rating INT, B. 2
PRIMARY KEY((name))
);
C. 3
INSERT INTO roller_coasters (name, park, rating) D. 4
VALUES ('Millenium Force', 'Cedar Point', 8 );

INSERT INTO roller_coasters (name, park, rating)


VALUES ('Formula Rossa', 'Ferrari World', 9 );
The first and fourth INSERTS use the same
primary key so they cause an upsert.
INSERT INTO roller_coasters (name, park, rating)
VALUES ('Steel Dragon 2000', 'Nagashima Spa Land', 10 );
Therefore only 3 rows are created.
INSERT INTO roller_coasters (name, park, rating)
VALUES ('Millenium Force', 'Cedar Point', 7 );
2. CQL - Developer and Administrator Exams (DS201)
Consider the CQL statements: What is the result of executing all the CQL statements?
CREATE TABLE songs (
A. A table with 1 partition.
artist TEXT,
title TEXT, B. A table with 2 partitions.
length_seconds INT,
PRIMARY KEY((artist, title)) C. A table with 3 partitions.
);
D. A table with 4 partitions.
INSERT INTO songs (artist, title, length_seconds)
VALUES ('The Beatles', 'Yesterday', 123 );

INSERT INTO songs (artist, title, length_seconds)


VALUES ('The Beatles', 'Let It Be', 243 );

INSERT INTO songs (artist, title, length_seconds)


VALUES ('Abba', 'Fernando', 255 );

INSERT INTO songs (artist, title, length_seconds)


VALUES ('Frank Sinatra', 'Yesterday', 235 );
2. Solution
Consider the CQL statements: What is the result of executing all the CQL statements?
CREATE TABLE songs (
A. A table with 1 partition.
artist TEXT,
title TEXT, B. A table with 2 partitions.
length_seconds INT,
PRIMARY KEY((artist, title)) C. A table with 3 partitions.
);
D. A table with 4 partitions.
INSERT INTO songs (artist, title, length_seconds)
VALUES ('The Beatles', 'Yesterday', 123 );

INSERT INTO songs (artist, title, length_seconds) The partition key consists of artist and title
VALUES ('The Beatles', 'Let It Be', 243 ); (incidentally, it is also the whole primary key).

INSERT INTO songs (artist, title, length_seconds)


VALUES ('Abba', 'Fernando', 255 ); Each INSERT has a unique artist/title pair so
there are no upserts and each INSERT results in
INSERT INTO songs (artist, title, length_seconds)
a unique partition.
VALUES ('Frank Sinatra', 'Yesterday', 235 );
3. CQL - Developer and Administrator Exams (DS201)
Consider the CQL statement: Which of the following is a valid query for the cars table?
CREATE TABLE cars (
A.
make TEXT, SELECT * FROM cars
model TEXT, WHERE make='Ford';
year INT,
B.
color TEXT, SELECT * FROM cars
cost INT, WHERE year = 1969
AND color = 'Red';
PRIMARY KEY ((make, model), year, color)
); C.
SELECT * FROM cars
WHERE make='Ford'
AND model = 'Mustang'
AND year = 1969;

D.
SELECT * FROM cars
WHERE make='Ford'
AND model = 'Mustang'
AND color = 'Red';
3. Solution
Consider the CQL statement: Which of the following is a valid query for the cars table?
CREATE TABLE cars (
A.
make TEXT, SELECT * FROM cars
model TEXT, WHERE make='Ford';
year INT,
B.
color TEXT, SELECT * FROM cars
cost INT, WHERE year = 1969
AND color = 'Red';
PRIMARY KEY ((make, model), year, color)
);
C.
The partition key consists of make and model so A and B
SELECT * FROM cars
WHERE make='Ford'
are excluded because the WHERE clause does not include
AND model = 'Mustang'
the partition key.
AND year = 1969;

C and D both include the partition key but clustering D.


SELECT * FROM cars
columns can only be constrained L-R in the order they WHERE make='Ford'
appear in the primary key. AND model = 'Mustang'
AND color = 'Red';

Since year appears before color, C is correct and D is


excluded.
4. CQL - Developer and Administrator Exams (DS201)
Consider the CQL statement: What is a valid statement about this batch?
CREATE TABLE employees (
id TEXT, A. It is a single-partition batch that can be applied.
name TEXT,
department TEXT, B. It is a single-partition batch that cannot be applied.
PRIMARY KEY ((id))
); C. It is a multi-partition batch that can be applied.

CREATE TABLE employees_by_department ( D. It is a multi-partition batch that cannot be applied.


id TEXT,
name TEXT,
department TEXT,
PRIMARY KEY ((department), id)
);

BEGIN BATCH
INSERT INTO employees (id, name, department)
VALUES ('AC1123', 'Joe', 'legal');

INSERT INTO employees_by_department (id, name, department)


VALUES ('AC1123', 'Joe', 'legal');
APPLY BATCH;
4. Solution
Consider the CQL statement: What is a valid statement about this batch?
CREATE TABLE employees (
id TEXT, A. It is a single-partition batch that can be applied.
name TEXT,
department TEXT, B. It is a single-partition batch that cannot be applied.
PRIMARY KEY ((id))
); C. It is a multi-partition batch that can be applied.
CREATE TABLE employees_by_department (
id TEXT,
D. It is a multi-partition batch that cannot be applied.
name TEXT,
department TEXT,
PRIMARY KEY ((department), id)
);
The two INSERTS are into different tables which makes

BEGIN BATCH them different partitions.


INSERT INTO employees (id, name, department)
VALUES ('AC1123', 'Joe', 'legal');
Even if one or both result in upserts there is nothing
INSERT INTO employees_by_department (id, name, department) preventing this batch from being applied.
VALUES ('AC1123', 'Joe', 'legal');
APPLY BATCH;
5. CQL - Developer and Administrator Exams (DS201)
Consider the table definition with a primary key It is known that:
omitted:
● Restaurant Reviews are uniquely identified by a
CREATE TABLE reviews_by_restaurant ( combination of name, city and reviewer
name TEXT, ● Restaurant Reviews are retrieved from the table using
city TEXT,
reviewer TEXT, combination of name, city
rating INT, ● The table has multi-row partitions
comments TEXT,
review_date TIMEUUID, What primary key does this table have?
PRIMARY KEY (...)
); A. PRIMARY KEY((name), reviewer, city)

B. PRIMARY KEY((name, city), reviewer)

C. PRIMARY KEY((name, reviewer), city)

D. PRIMARY KEY(reviewer, name, city)


5. Solution
Consider the table definition with a primary key It is known that:
omitted:
● Restaurant Reviews are uniquely identified by a
CREATE TABLE reviews_by_restaurant ( combination of name, city and reviewer
name TEXT, ● Restaurant Reviews are retrieved from the table using
city TEXT,
reviewer TEXT, combination of name, city
rating INT, ● The table has multi-row partitions
comments TEXT,
review_date TIMEUUID, What primary key does this table have?
PRIMARY KEY (...)
); A. PRIMARY KEY((name), reviewer, city)

B. PRIMARY KEY((name, city), reviewer)


Since restaurant reviews are uniquely identified by a
combination of name, city and reviewer the primary key must C. PRIMARY KEY((name, reviewer), city)
include all three fields.
D. PRIMARY KEY(reviewer, name, city)
Since restaurant reviews are retrieved from the table using
combination of name, city, these two fields must come before
reviewer in the primary key.

A primary key ((name), city, reviewer) would also


have worked fine, with the query selecting a (contiguous) part
of a wider partition.
6. CQL - Developer Exam (DS220)
Consider the table definition and the CQL query: Which materialized view definition can be used to support the
CREATE TABLE teams ( query?
name TEXT PRIMARY KEY, A.
wins INT, CREATE MATERIALIZED VIEW IF NOT EXISTS
losses INT, teams_by_wins AS
SELECT * FROM teams
ties INT
PRIMARY KEY((name), wins);
);

SELECT * FROM teams_by_wins WHERE wins = 4;


B.
CREATE MATERIALIZED VIEW IF NOT EXISTS
teams_by_wins AS
SELECT * FROM teams
PRIMARY KEY((wins), name);

C.
CREATE MATERIALIZED VIEW IF NOT EXISTS
teams_by_wins AS
SELECT * FROM teams
WHERE name IS NOT NULL AND wins IS NOT NULL
PRIMARY KEY((name), wins);

D.
CREATE MATERIALIZED VIEW IF NOT EXISTS
teams_by_wins AS
SELECT * FROM teams
WHERE wins IS NOT NULL AND name IS NOT NULL
PRIMARY KEY((wins), name);
6. Solution
Consider the table definition and the CQL query: Which materialized view definition can be used to support the
CREATE TABLE teams ( query?
name TEXT PRIMARY KEY, A.
wins INT, CREATE MATERIALIZED VIEW IF NOT EXISTS
losses INT, teams_by_wins AS
SELECT * FROM teams
ties INT
PRIMARY KEY((name), wins);
);

SELECT * FROM teams_by_wins WHERE wins = 4;


B.
CREATE MATERIALIZED VIEW IF NOT EXISTS
teams_by_wins AS
SELECT * FROM teams
PRIMARY KEY((wins), name);

C.
CREATE MATERIALIZED VIEW IF NOT EXISTS
teams_by_wins AS
Since primary key fields cannot be NULL the WHERE clause SELECT * FROM teams
must include a NULL check. WHERE name IS NOT NULL AND wins IS NOT NULL
PRIMARY KEY((name), wins);
Since the WHERE clause in the SELECT is based on wins,
wins must be the partition key. D.
CREATE MATERIALIZED VIEW IF NOT EXISTS
teams_by_wins AS
SELECT * FROM teams
WHERE wins IS NOT NULL AND name IS NOT NULL
PRIMARY KEY((wins), name);
7. CQL - Developer Exam (DS220)
Consider the table definition and the CQL query: Which secondary index can be used to support the query?
CREATE TABLE restaurants_by_city (
name TEXT, A.
city TEXT, CREATE INDEX cuisine_restaurants_by_city_2i
cuisine TEXT, ON restaurants_by_city (cuisine);
price int,
PRIMARY KEY ((city), name) B.
); CREATE INDEX cuisine_restaurants_by_city_2i
ON restaurants_by_city (city, cuisine);
SELECT * FROM restaurants_by_city
WHERE city = 'Sydney' C.
CREATE INDEX cuisine_restaurants_by_city_2i
AND cuisine = 'sushi';
ON restaurants_by_city (cuisine, city);

D.
CREATE INDEX cuisine_restaurants_by_city_2i
ON restaurants_by_city (city, name, cuisine);
7. Solution
Consider the table definition and the CQL query: Which secondary index can be used to support the query?
CREATE TABLE restaurants_by_city (
name TEXT, A.
city TEXT,
cuisine TEXT,
CREATE INDEX cuisine_restaurants_by_city_2i
price int, ON restaurants_by_city (cuisine);
PRIMARY KEY ((city), name)
); B.
CREATE INDEX cuisine_restaurants_by_city_2i
SELECT * FROM restaurants_by_city ON restaurants_by_city (city, cuisine);
WHERE city = 'Sydney'
AND cuisine = 'sushi'; C.
CREATE INDEX cuisine_restaurants_by_city_2i
ON restaurants_by_city (cuisine, city);

D.
CREATE INDEX cuisine_restaurants_by_city_2i
B, C, and D are incorrect because indexes on multiple ON restaurants_by_city (city, name, cuisine);
columns are not supported.
8. CQL - Developer and Administrator Exams (DS201)
Which statement describes the WHERE clause in a query?

A. WHERE clauses must reference all the fields of the partition key.

B. WHERE clauses must reference all the fields of the clustering key.

C. WHERE clauses must reference all the fields of the primary key.

D. WHERE clauses must reference all the fields of the partition key and
clustering key.
8. Solution
Which statement describes the WHERE clause in a query?

A. WHERE clauses must reference all the fields of the partition key.

B. WHERE clauses must reference all the fields of the clustering key.

C. WHERE clauses must reference all the fields of the primary key.

D. WHERE clauses must reference all the fields of the partition key and
clustering key.

Only the fields of the partition key are required.


9. CQL - Developer and Administrator Exams (DS201)
Consider the CQL statements: Which INSERT statement can be used to insert a row in the
CREATE TYPE NAME ( people table?
first TEXT,
last TEXT A.
); INSERT INTO people (id, name, email)
VALUES (UUID(), {first:'foo', last:'bar'}, '[email protected]' );
CREATE TABLE people (
id UUID, B.
name NAME, INSERT INTO people (id, name, email)
email TEXT, VALUES (UUID(), name: {'foo', 'bar'}, '[email protected]' );
PRIMARY KEY((id), email)
); C.
INSERT INTO people (id, name, email)
VALUES (UUID(), 'foo', 'bar', '[email protected]' );

D.
INSERT INTO people (id, name, email)
VALUES (UUID(), ('foo', 'bar), '[email protected]' );
9. Solution
Consider the CQL statements: Which INSERT statement can be used to insert a row in the
CREATE TYPE NAME ( people table?
first TEXT,
last TEXT A.
);
INSERT INTO people (id, name, email)
CREATE TABLE people ( VALUES (UUID(), {first:'foo', last:'bar'}, '[email protected]' );
id UUID,
name NAME, B.
email TEXT, INSERT INTO people (id, name, email)
VALUES (UUID(), name: {'foo', 'bar'}, '[email protected]' );
PRIMARY KEY((id), email)
);
C.
INSERT INTO people (id, name, email)
VALUES (UUID(), 'foo', 'bar', '[email protected]' );

D.
INSERT INTO people (id, name, email)
The fields of the user defined type VALUES (UUID(), ('foo', 'bar), '[email protected]' );
are passed using JSON.
10. CQL - Developer and Administrator Exams (DS201)
Consider the CQL statements: What is the result of executing theses CQL statements?
CREATE TABLE emails_by_user (
username TEXT, A.
email TEXT, username | email | nickname | description
description TEXT, ----------------+-------------------------------+---------------+-----------------
nickname TEXT STATIC, dc1234 | [email protected] | Dave | work
PRIMARY KEY((username), email) dc1234 | [email protected] | Davey | school
);
B.
INSERT INTO emails_by_user (username, email, description, nickname) username | email | nickname | description
VALUES (‘dc1234’, '[email protected]', 'work', 'Dave'); ----------------+-------------------------------+----------------+-----------------
dc1234 | [email protected] | Davey | work
INSERT INTO emails_by_user (username, email, description, nickname) dc1234 | [email protected] | Davey | school
VALUES (‘dc1234’, '[email protected]', 'personal', 'Dave');

UPDATE emails_by_user SET nickname = 'Davey', description = 'school'


C.
WHERE username = ‘dc1234’ AND email = '[email protected]'; username | email | nickname | description
----------------+--------------------------------+---------------+-----------------
SELECT * FROM emails_by_user WHERE username = ‘dc1234’; dc1234 | [email protected] | Davey | school

D.
username | email | nickname | description
----------------+--------------------------------+---------------+-----------------
dc1234 | [email protected] | Dave | work
10. Solution
Consider the CQL statements: What is the result of executing theses CQL statements?
CREATE TABLE emails_by_user (
username TEXT, A.
email TEXT, username | email | nickname | description
description TEXT, ----------------+-------------------------------+---------------+-----------------
nickname TEXT STATIC, dc1234 | [email protected] | Dave | work
PRIMARY KEY((username), email) dc1234 | [email protected] | Davey | school
);
B.
INSERT INTO emails_by_user (username, email, description, nickname) username | email | nickname | description
VALUES (‘dc1234’, '[email protected]', 'work', 'Dave');
----------------+-------------------------------+----------------+-----------------
INSERT INTO emails_by_user (username, email, description, nickname) dc1234 | [email protected] | Davey | work
VALUES (‘dc1234’, '[email protected]', 'personal', 'Dave'); dc1234 | [email protected] | Davey | school
UPDATE emails_by_user SET nickname = 'Davey', description = 'school'
WHERE username = ‘dc1234’ AND email = '[email protected]'; C.
username | email | nickname | description
SELECT * FROM emails_by_user WHERE username = ‘dc1234’; ----------------+--------------------------------+---------------+-----------------
dc1234 | [email protected] | Davey | school

Because email is a clustering column the table D.


username | email | nickname | description
has one partition with two rows. ----------------+--------------------------------+---------------+-----------------
dc1234 | [email protected] | Dave | work
The nickname field is static so it was set to Davey
for the entire partition.
11. Architecture Exams (DS201)
Consider the two datacenters in the diagram. What is a valid statement about a read request made at
consistency level of LOCAL QUORUM to coordinator node Z in
TokyoDC has six nodes (two failed and four active) and ParisDC?
a replication factor of 3, and ParisDC four nodes (one
failed and three active) and a replication factor of 3. A. The request will be handled in data center ParisDC and will fail.

B. The request will be handled in data center ParisDC and will succeed.

C. The request will be retried in data center TokyoDC and will fail.

D. The request will be retried in data center TokyoDC and will succeed.
11. Solution
Consider the two datacenters in the diagram. What is a valid statement about a read request made at
consistency level of LOCAL QUORUM to coordinator node Z in
TokyoDC has six nodes (two failed and four active) and ParisDC?
a replication factor of 3, and ParisDC four nodes (one
failed and three active) and a replication factor of 3. A. The request will be handled in data center ParisDC and will fail.

B. The request will be handled in data center ParisDC and will


succeed.

C. The request will be retried in data center TokyoDC and will fail.

D. The request will be retried in data center TokyoDC and will succeed.

LOCAL QUORUM requires a quorum (more than


half) of the replicas in a the local data center to
respond in order to succeed.

Since only 1 of 4 nodes have failed there will be at


least 2 replicas available to handle the request. 2
is the quorum of 3, therefore the request will
succeed.
12. Architecture Exams (DS201)
Consider these CQL traces (You may need to scroll to see the entire trace.):

activity | timestamp | source | source_elapsed | client


-------------------------------------------------------------------------------------------------------------------------+--------------------------------------------+-------------------+------------------------+------------------
Execute CQL3 query | 2020-10-09 16:18:49.223000 | 10.52.26.153 | 0 | 10.52.13.186
Parsing INSERT INTO NAMES (id, name) VALUES (UUID(), 'Dave'); [CoreThread-0] | 2020-10-09 16:18:49.223000 | 10.52.26.153 | 328 | 10.52.13.186
Preparing statement [CoreThread-0] | 2020-10-09 16:18:49.223000 | 10.52.26.153 | 690 | 10.52.13.186
Determining replicas for mutation [CoreThread-0] | 2020-10-09 16:18:49.224000 | 10.52.26.153 | 1834 | 10.52.13.186
Appending to commitlog [CoreThread-0] | 2020-10-09 16:18:49.225000 | 10.52.26.153 | 2193 | 10.52.13.186
Adding to names memtable [CoreThread-0] | 2020-10-09 16:18:49.225000 | 10.52.26.153 | 2326 | 10.52.13.186
Request complete | 2020-10-09 16:18:49.225966 | 10.52.26.153 | 2966 | 10.52.13.186

At what elapsed time is the data persisted so that it will survive an unexpected node shutdown?
A. 690 microseconds

B. 1834 microseconds

C. 2193 microseconds

D. 2966 microseconds
12. Solution
Consider these CQL traces (You may need to scroll to see the entire trace.):

activity | timestamp | source | source_elapsed | client


-------------------------------------------------------------------------------------------------------------------------+--------------------------------------------+-------------------+------------------------+------------------
Execute CQL3 query | 2020-10-09 16:18:49.223000 | 10.52.26.153 | 0 | 10.52.13.186
Parsing INSERT INTO NAMES (id, name) VALUES (UUID(), 'Dave'); [CoreThread-0] | 2020-10-09 16:18:49.223000 | 10.52.26.153 | 328 | 10.52.13.186
Preparing statement [CoreThread-0] | 2020-10-09 16:18:49.223000 | 10.52.26.153 | 690 | 10.52.13.186
Determining replicas for mutation [CoreThread-0] | 2020-10-09 16:18:49.224000 | 10.52.26.153 | 1834 | 10.52.13.186
Appending to commitlog [CoreThread-0] | 2020-10-09 16:18:49.225000 | 10.52.26.153 | 2193 | 10.52.13.186
Adding to names memtable [CoreThread-0] | 2020-10-09 16:18:49.225000 | 10.52.26.153 | 2326 | 10.52.13.186
Request complete | 2020-10-09 16:18:49.225966 | 10.52.26.153 | 2966 | 10.52.13.186

At what elapsed time is the data persisted so that it will survive an unexpected node shutdown?
A. 690 microseconds

B. 1834 microseconds
Once data is written to commit log it will survive
an unexpected node shutdown.
C. 2193 microseconds

D. 2966 microseconds
13. Architecture Exams (DS201)
How is Replication Factor configured in Cassandra?

A. per cluster

B. per keyspace

C. per operation

D. per node
13. Solution
How is Replication Factor configured in Cassandra?

A. per cluster

B. per keyspace
C. per operation

D. per node

Replication factor (and strategy) MUST BE configured when creating a


keyspace.
Cassandra Certification Workshop

1. Which certification and what resources?

2. Steps for certification

3. DS201 (Foundation) practice

4. DS210 (Admin) practice

5. DS220 (Data Modeling) practice

6. Resources
14. Administrator Exams (DS210)
What are two options for internode_encryption in
Cassandra? (Choose two.)

A. client

B. node

C. rack

D. enabled

E. dc
14. Solution
What are two options for internode_encryption in
Cassandra? (Choose two.)

A. client

B. node

C. rack
The available options are: all,
D. enabled
none, dc and rack.

E. dc
15. Administrator Exams (DS210)
Which configuration file is used to set garbage collection
properties for Cassandra?

A. cassandra.yaml

B. jvm.options

C. cassandra-env.sh

D. gc.options
15. Solution
Which configuration file is used to set garbage collection
properties for Cassandra?

A. cassandra.yaml

B. jvm.options
C. cassandra-env.sh The purpose of the jvm.options
file is to put JVM-specific
D. gc.options properties (like garbage
collection) in one place.
16. Administrator Exams (DS210)
Consider the table definition and how a single row is What are the current values for this row?
stored in one Memtable and two SSTables on a
A.
Cassandra node: id | test | score
----+-----------+-------
CREATE TABLE tests ( 11 | english | 48
id INT PRIMARY KEY,
test TEXT, B.
score int
id | test | score
);
----+--------+-------
11 | math | 75
Memtable

id: 11 timestamp: 1392353211 C.


score: 75 timestamp: 1392353211 id | test | score
----+--------+-------
SSTable 11 | math | 62

id: 11 timestamp: 1204596828 D.


test: math timestamp: 1204596828 id | test | score
score: 62 timestamp: 1204596828 ----+--------+-------
11 | math | 48
SSTable

id: 11 timestamp: 1183608357


test: english timestamp: 1183608357
score: 48 timestamp: 1183608357
16. Solution
Consider the table definition and how a single row is What are the current values for this row?
stored in one Memtable and two SSTables on a
A.
Cassandra node: id | test | score
----+-----------+-------
CREATE TABLE tests ( 11 | english | 48
id INT PRIMARY KEY,
test TEXT,
score int B.
);
id | test | score
Memtable ----+--------+-------
id: 11 timestamp: 1392353211 11 | math | 75 Data for a row may be
score: 75 timestamp: 1392353211 spread across the memtable
C.
SSTable
id | test | score
and multiple SSTables. The
id: 11 timestamp: 1204596828
----+--------+------- row value is made up of the
11 | math | 62
test: math timestamp: 1204596828 most recent (timestamp)
score: 62 timestamp: 1204596828
D. value for each column.
SSTable id | test | score
----+--------+-------
id: 11 timestamp: 1183608357 11 | math | 48
test: english timestamp: 1183608357
score: 48 timestamp: 1183608357
17. Administrator Exams (DS210)
What is a valid statement about a coordinator node
handling a query at consistency level THREE?

A. The coordinator node sends a direct read request to all


replicas.

B. The coordinator node sends a direct read request to


three replicas.

C. The coordinator node sends a background read repair


request to three replicas.

D. The coordinator node sends a direct read request to


one replica and digest requests to two replicas.
17. Solution
What is a valid statement about a coordinator node
handling a query at consistency level THREE?

A. The coordinator node sends a direct read request to all The coordinator node only sends a direct read
request to one node and sends digest
replicas.
request(s) to the remainder necessary to meet
the consistency level.
B. The coordinator node sends a direct read request to
three replicas. The coordinator node then compares the data
read directly with the digest(s). If they agree
the result is returned to the client.
C. The coordinator node sends a background read repair
request to three replicas. If they do not agree the most recent
timestamped result is considered current and
sent to the client. The coordinator node may
D. The coordinator node sends a direct read request to need to request the latest timestamped version
one replica and digest requests to two replicas. from a replica.
18. Administrator Exams (DS210)
What is a valid statement about a write made at consistency level LOCAL_QUORUM
against a keyspace with replication factor of 3?

A. The coordinator node will send a write to one node.

B. The coordinator node will send writes to two nodes.

C. The coordinator node will send writes to three nodes.

D. The coordinator node will send writes to all nodes.


18. Solution
What is a valid statement about a write made at consistency level LOCAL_QUORUM
against a keyspace with replication factor of 3?

A. The coordinator node will send a write to one node.

B. The coordinator node will send writes to two nodes.

C. The coordinator node will send writes to three nodes.

D. The coordinator node will send writes to all nodes. The coordinator node will always
attempt to write to the number of
nodes specified in the replication
factor.
Cassandra Certification Workshop

1. Which certification and what resources?

2. Steps for certification

3. DS201 (Foundation) practice

4. DS210 (Admin) practice

5. DS220 (Data Modeling) practice

6. Resources
19. Data Modeling (DS220) What is the primary key and clustering order of the
Consider the Chebotko Diagram that captures the table trades_by_a_sd?
physical data model for investment portfolio data:
A.
PRIMARY KEY((account), trade_id, symbol)
)
WITH CLUSTERING ORDER BY (trade_id DESC, symbol ASC);

B.
PRIMARY KEY((account), trade_id, symbol)
)
WITH CLUSTERING ORDER BY (trade_id DESC);

C.
PRIMARY KEY((account), symbol, trade_id)
)
WITH CLUSTERING ORDER BY (trade_id DESC);

D.
PRIMARY KEY((account), symbol, trade_id)
)
WITH CLUSTERING ORDER BY (symbol ASC, trade_id DESC);
19. Solution What is the primary key and clustering order of the
Consider the Chebotko Diagram that captures the table trades_by_a_sd?
physical data model for investment portfolio data:
A.
PRIMARY KEY((account), trade_id, symbol)
)
WITH CLUSTERING ORDER BY (trade_id DESC, symbol ASC);

B.
PRIMARY KEY((account), trade_id, symbol)
)
WITH CLUSTERING ORDER BY (trade_id DESC);

C.
PRIMARY KEY((account), symbol, trade_id)
)
WITH CLUSTERING ORDER BY (trade_id DESC);

D.
PRIMARY KEY((account), symbol, trade_id)
)
WITH CLUSTERING ORDER BY (symbol ASC, trade_id DESC);

In Chebotko diagrams a table lists clustering keys in the order they appear in the
primary key. If the clustering order is explicitly specified for a column with WITH
CLUSTERING ORDER BY clause, the clustering order for all preceding clustering
key columns must also be explicitly specified.
20. Data Modeling (DS220)
Consider the Application Workflow Which access pattern(s) are evaluated before an
Diagram for an investment portfolio application can evaluate Q3.2?
application:
A. Q1

B. Q1 and Q2

C. Q1 and Q3

D. Q1, Q3 and Q3.1


20. Data Modeling (DS220)
Consider the Application Workflow Which access pattern(s) are evaluated before an
Diagram for an investment portfolio application can evaluate Q3.2?
application:
A. Q1
B. Q1 and Q2

C. Q1 and Q3

D. Q1, Q3 and Q3.1

Q1 is the entry point. After Q1, Q2 or Q3 may be


evaluated. Q3 is broken down into Q3.1 - Q3.5. The
only prerequisite for Q3.1 - Q3.5 is Q1. Therefore,
only Q1 must be evaluated before Q3.2
menti.com
Cassandra Certification Workshop

1. Which certification and what resources?

2. Steps for certification

3. DS201 (Foundation) practice

4. DS210 (Admin) practice

5. DS220 (Data Modeling) practice

6. Resources
MORE LEARNING!!!!
Developer site: datastax.com/dev

● Developer Stories
● New hands-on learning scenarios with
Katacoda
● Try it Out
● Cassandra Fundamentals
● https://katacoda.com/datastax/courses/cassandra
-intro
● New Data Modeling course
https://katacoda.com/datastax/courses/cassandra
-data-modeling

Classic courses available at DataStax Academy


Developer Resources
New hands-on learning at www.datastax.com/dev
LEARN
Classic courses available at DataStax Academy

Join community.datastax.com
ASK/SHARE
Ask/answer community user questions - share your expertise

Follow us @DataStaxDevs
CONNECT
We are on Youtube - Twitter - Twitch!

Slides and practice questions for this course are available at


https://github.com/DataStax-Academy/workshop-cassandra
MATERIALS
-certificationcassandra-workshop-series
Thank You

You might also like