I am planning to take DataStax Cassandra Certification for Developer. I recently took the practice test and I scored 94% out of 100 by having 1 answer marked wrong. The question is:
Given the following table, which of the following statements is an example of
Data Modification Language (DML) in CQL? CREATE TABLE comics ( title text,
issueNumber int, originalPriceDollars float, PRIMARY KEY ( title, issueNumber
) );
SELECT * FROM comics;
ALTER TABLE comics ADD currentPriceDollars float;
DROP KEYSPACE test;
None of the other answers are DML.
I chose ALTER TABLE comics option and according to DataStax this answer is wrong. Then what is DML in Cassandra. Isn't this statement modifying the data? And, the correct answer is None.
Thanks.
ALTER
would technically be DDL (Data Definition Language), as it changes the underlying tables/structures.
DML (Data Manipulation Language) would be something like:
UPDATE comics SET originalPriceDollars=6.99
WHERE title='Star Wars: Darth Maul' AND issueNumber=1;
Essentially UPDATE
and INSERT
change data, ALTER
changes underlying tables/structures.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With