简体   繁体   English

什么是Apache Cassandra中的DML?

[英]What is DML in Apache Cassandra?

I am planning to take DataStax Cassandra Certification for Developer. 我计划为开发人员提供DataStax Cassandra认证。 I recently took the practice test and I scored 94% out of 100 by having 1 answer marked wrong. 我最近参加了练习测试,我得到了94%的100分,其中1个答案标记错误。 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. 我选择了ALTER TABLE漫画选项,根据DataStax,这个答案是错误的。 Then what is DML in Cassandra. 那么什么是Cassandra的DML。 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. ALTER技术上讲, ALTER将是DDL(数据定义语言),因为它会更改基础表/结构。

DML (Data Manipulation Language) would be something like: DML(数据操作语言)将类似于:

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. 基本上UPDATEINSERT更改数据, ALTER更改基础表/结构。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM