Cassandra學習筆記(2)

P.K.

Cassandra與傳統關係型數據庫的差別

cassandra-cli的基本操作

查看幫助文檔
help;

查看所有的鍵空間
show keyspaces;

創建鍵空間
create keyspace testkeyspace;

進入創建好的名爲root的鍵空間
use testkeyspace;

創建列族users並指定UTF8排序屬性
create column family users with comparator = UTF8Type;

插入數據
set users[utf8('zhangsan')][utf8('address')][utf8('company')]=utf8('shanghai');

獲取相應列的數據
get users[utf8('zhangsan')]

設置超級列
create column family users with comparator = UTF8Type and column_type=Super

CQL數據定義語句

1.CQL數據定義語句

2.create keyspace

屬性

3.alter keyspace

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章