cassandra-user mailing list archives

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

http://mail-archives.apache.org/mod_mbox/cassandra-dev/201210.mbox/%3CCAJHHpg20RRcAJqJDNF8SF7wnhbLo6j+AOFKsgbxyXwcOocG6oA@mail.gmail.com%3E

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 {
   @Embedded
    Private List<Email> emails;
    @Embedded
    Private List<SomethingElse> otherStuff
    @OneToMany
    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.

Thanks,
Dean

Mime
View raw message