How about using a composite row key like the following: Entity.Day1.TypeA: {col1:val1, col2:val2, . . . } Entity.Day1.TypeB: {col1:val1, col2:val2, . . . } . . Entity.DayN.TypeA: {col1:val1, col2:val2, . . . } Entity.DayN.TypeB: {col1:val1, col2:val2, . . . }
It is better to avoid super columns.. -indra On Thu, Feb 23, 2012 at 6:36 PM, Franc Carter <franc.car...@sirca.org.au>wrote: > > Hi, > > I've finished my first model and experiments with Cassandra with result > I'm pretty happy with - so I thought I'd move on to something harder. > > We have a set of data that has a large number of entities (which is our > primary search key), for each of the entities we have a smallish (<100) > number of sets of data. Each set has a further set the contains column/vale > pairs. > > The queries will be for an Entity, for one or more days for one or more of > the subsets. Conceptually I would like to model like it like this:- > > Entity { > Day1: { > TypeA: {col1:val1, col2:val2, . . . } > TypeB: {col1:val1, col3:val3, . . . } > . > . > } > . > . > . > DayN: { > TypeB: {col3:val3, col5:val5, . . . } > TypeD: {col3:val3, col6:val6, . . . } > . > . > } > } > > My understanding of the Cassandra data model is that I run out of map-dept > to do this in my simplistic approach as the Days are super columns, the > types are column and then I don't have a col/val map left for data. > > Does anyone have advice on a good approach ? > > thanks > > -- > > *Franc Carter* | Systems architect | Sirca Ltd > <marc.zianideferra...@sirca.org.au> > > franc.car...@sirca.org.au | www.sirca.org.au > > Tel: +61 2 9236 9118 > > Level 9, 80 Clarence St, Sydney NSW 2000 > > PO Box H58, Australia Square, Sydney NSW 1215 > > -- *Indranath Ghosh Phone: 408-813-9207*