-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathcreate-database-cli.txt
61 lines (52 loc) · 1.58 KB
/
create-database-cli.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
create keyspace Killrvideo
with strategy_options = {replication_factor:1}
and placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy';
use Killrvideo;
create column family users with
comparator = UTF8Type and
column_metadata =
[
{column_name: firstname, validation_class: UTF8Type},
{column_name: lastname, validation_class: UTF8Type},
{column_name: password, validation_class: UTF8Type}
];
create column family videos
WITH key_validation_class=UUIDType
and comparator = UTF8Type and
column_metadata =
[
{column_name: videoname, validation_class: UTF8Type},
{column_name: username, validation_class: UTF8Type},
{column_name: description, validation_class: UTF8Type},
{column_name: tags, validation_class: UTF8Type}
];
create column family comments
WITH key_validation_class=UUIDType
and comparator = UTF8Type and
column_metadata =
[
{column_name: comment, validation_class: UTF8Type}
];
create column family video_rating
WITH key_validation_class=UUIDType
and default_validation_class=CounterColumnType
and replicate_on_write=true;
create column family video_event
WITH comparator = UTF8Type and
column_metadata =
[
{column_name: event, validation_class: UTF8Type}
];
create column family username_video_index
WITH comparator = UTF8Type and
column_metadata =
[
{column_name: timestamp, validation_class: UTF8Type}
];
create column family tag_index
WITH key_validation_class=UTF8Type and
comparator = UTF8Type and
column_metadata =
[
{column_name: videoid, validation_class: UUIDType}
];