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,
|
||||
last_name text,
|
||||
title text,
|
||||
emails set,
|
||||
phone_numbers list,
|
||||
addresses map<text,
|
||||
frozen<address>,
|
||||
confirm_number text )
|
||||
WITH comment = 'Q9. Find guest by ID';
|
||||
emails set<text>,
|
||||
phone_numbers list<text>,
|
||||
addresses map<text, frozen<address>>,
|
||||
confirm_number text
|
||||
) WITH comment = 'Q9. Find guest by ID';
|
||||
----
|
||||
|
||||
You now have a complete Cassandra schema for storing data for a hotel
|
||||
|
|
|
|||
Loading…
Reference in New Issue