cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiller, Dean" <>
Subject CQL Sets and Maps
Date Thu, 11 Oct 2012 14:18:12 GMT
I was reading Brian's post

In which he asks

> Any insight into why CQL puts that in column name?
> Where does it store the metadata related to compound key
> interpretation? Wouldn't that be a better place for that since it
> shouldn't change within a table?

I have those same questions and would like to understand how it stores stuff better.  For
example, if PlayOrm has the following

User {
    Private List<Email> emails;
    Private List<SomethingElse> otherStuff
    Private List<Owner> owners;

It ends up storing

rowkey: userid
=> column=emails:email1Id:title, value="some email title"
=> column=emails:email1Id:contents, value="some contents in email really really long"
=> column=emails:email2Id:title, value="some other email"
=> column=owners:ownerId29,  value=null
=> column=owners:ownerId57,  value=null

Basically using "emails" as the prefix since User can have other embedded objects, and using
emailId as the next prefix so you can have many unique emails and then having each email property.
 How is it actually stored when doing Sets and Maps in CQL??  Ideally, I would like PlayOrm
to overlay on top of that.


View raw message