Database Reference
In-Depth Information
Figure4-2.The hotel search represented with Cassandra's model
In this design, we're doing all the same things as in the relational design. We have transferred
some of the tables, such as Hotel and Guest , to column families. Other tables, such as
PointOfInterest , have been denormalized into a super column family. In the relational model,
you can look up hotels by the city they're in using a SQL statement. But because we don't have
SQL in Cassandra, we've created an index in the form of the HotelByCity column family.
NOTE
I'm using a stereotype notation here, so <<CF>> refers to a column family, <<SCF>> refers to a super
column family, and so on.
We have combined room and amenities into a single column family, Room . The columns such as
type and rate will have corresponding values; other columns, such as hot tub, will just use the
presence of the column name itself as the value, and be otherwise empty.
Search WWH ::




Custom Search