Apache Cassandra Flashcards
What year was Apache Cassandra originally released as open source?
a) 2005
b) 2008
c) 2010
d) 2012
b) 2008
Which of the following companies is NOT mentioned as a large-scale user of Apache Cassandra?
a) Apple
b) Netflix
c) Amazon
d) Uber
c) Amazon
What is the default replication factor for a new database created in Astra DB?
a) 1
b) 2
c) 3
d) 4
c) 3
What is the purpose of a keyspace in Apache Cassandra?
a) To define the data types for columns
b) To logically separate tables in a multi-user database cluster
c) To encrypt data at rest
d) To manage user permissions
b) To logically separate tables in a multi-user database cluster
Which of the following is a valid data type in Cassandra for storing text?
a) VARCHAR
b) TEXT
c) STRING
d) Both a) and b)
d) Both a) and b)
What is the primary key used for in Apache Cassandra?
a) To encrypt data
b) To determine on which database nodes the data should be stored
c) To define foreign key relationships
d) To create indexes for faster queries
b) To determine on which database nodes the data should be stored
What is the role of the clustering key in a Cassandra table?
a) To define the partition key
b) To determine the on-disk sort order within a partition
c) To encrypt data within a partition
d) To create secondary indexes
b) To determine the on-disk sort order within a partition
What does the STATIC keyword indicate in a Cassandra table definition?
a) The column value will be the same for all rows in a partition
b) The column value will be unique for each row
c) The column will not be stored on disk
d) The column will be encrypted
a) The column value will be the same for all rows in a partition
Which of the following is a valid CQL command to switch to a specific keyspace?
a) USE keyspace_name;
b) SWITCH TO keyspace_name;
c) SELECT keyspace_name;
d) CONNECT keyspace_name;
a) USE keyspace_name;
What is the purpose of the token() function in Cassandra?
a) To generate a unique identifier for a row
b) To hash the partition key into a token for node placement
c) To encrypt data in transit
d) To create a backup of the database
b) To hash the partition key into a token for node placement
Which of the following is a valid CQL command to insert data into a Cassandra table?
a) INSERT INTO table_name VALUES (value1, value2);
b) ADD TO table_name VALUES (value1, value2);
c) UPDATE table_name SET column1 = value1;
d) CREATE table_name VALUES (value1, value2);
a) INSERT INTO table_name VALUES (value1
What is the default sort order for a clustering key in Cassandra if not specified?
a) Ascending (ASC)
b) Descending (DESC)
c) Random
d) No default sort order
a) Ascending (ASC)
Which of the following is NOT a valid method in the Cassandra Java driver for building a CqlSession?
a) withCloudSecureConnectBundle()
b) withAuthCredentials()
c) withKeyspace()
d) withEncryptionKey()
d) withEncryptionKey()
What is the purpose of the finalize() method in the CassandraConn class?
a) To initialize the database connection
b) To close the database connection when the object is garbage collected
c) To execute a query
d) To create a new keyspace
b) To close the database connection when the object is garbage collected
Which environment variable is used to specify the secure connect bundle file location in Astra DB?
a) ASTRA_DB_BUNDLE
b) ASTRA_DB_KEYSPACE
c) ASTRA_DB_PASSWORD
d) ASTRA_DB_USER
a) ASTRA_DB_BUNDLE