mirror of https://github.com/apache/cassandra
Update data-modeling_schema.adoc
Remember that for set and list collections, you need to specify the element type inside the angle brackets (<>). For map, you need to specify both the key type and value type separated by a comma.
This commit is contained in:
parent
0742f15f10
commit
4c0a2e59ad
|
|
@ -114,12 +114,11 @@ CREATE TABLE reservation.guests (
|
||||||
first_name text,
|
first_name text,
|
||||||
last_name text,
|
last_name text,
|
||||||
title text,
|
title text,
|
||||||
emails set,
|
emails set<text>,
|
||||||
phone_numbers list,
|
phone_numbers list<text>,
|
||||||
addresses map<text,
|
addresses map<text, frozen<address>>,
|
||||||
frozen<address>,
|
confirm_number text
|
||||||
confirm_number text )
|
) WITH comment = 'Q9. Find guest by ID';
|
||||||
WITH comment = 'Q9. Find guest by ID';
|
|
||||||
----
|
----
|
||||||
|
|
||||||
You now have a complete Cassandra schema for storing data for a hotel
|
You now have a complete Cassandra schema for storing data for a hotel
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue