incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sasha Dolgy <sdo...@gmail.com>
Subject Re: Querying superColumn
Date Fri, 17 Jun 2011 11:26:26 GMT
Write two records ...

1.  [department1] = { "Vivek" : "India" }
2.  [India] = { "Vivek" : "department1" }

1.  [department1] = { "Vivs" : "USA" }
2.  [USA] = { "Vivs" : "department1" }

Now you can query a single row to display all employees in USA or all
employees in department1 ... employee moves to a new department in a
new country, simply remove the column from that department row and
country row and re-insert into the new rows...

My understanding with Cassandra and similar technologies is that you
are designing to be smart and avoid data duplication.  You are
designing to address the searches and queries based on your business
requirements ... when you know what those are, you cheat and
pre-populate the data you will be searching on ...

On Fri, Jun 17, 2011 at 1:16 PM, Vivek Mishra
<vivek.mishra@impetus.co.in> wrote:
> Correct. But that will not solve issue of data colocation(data locality) ?
>
>
>
> From: Sasha Dolgy [mailto:sdolgy@gmail.com]
> Sent: Thursday, June 16, 2011 8:47 PM
> To: user@cassandra.apache.org
> Subject: Re: Querying superColumn
>
>
>
> Have 1 row with employee info for country/office/division, each column an
> employee id and json info about the employee or a reference.to.another row
> id for that employee data....
>
> No more supercolumn.
>
> On Jun 16, 2011 1:56 PM, "Vivek Mishra" <vivek.mishra@impetus.co.in> wrote:
>> I have a question about querying super column
>>
>> For example:
>>
>> I have a supercolumnFamily DEPARTMENT with dynamic superColumn 'EMPLOYEE'(
>> name, country).
>>
>> Now for rowKey 'DEPT1' I have inserted multiple super column like:
>>
>> Employee1{
>> Name: Vivek
>> country: India
>> }
>>
>> Employee2{
>> Name: Vivs
>> country: USA
>> }
>>
>>
>>
>> Now if I want to retrieve a super column whose rowkey is 'DEPT1' and
>> employee name is 'Vivek'. Can I get only 'EMPLOYEE1' ?
>>
>>
>>
>> -Vivek
>>
>> ________________________________
>>
>> Write to us for a Free Gold Pass to the Cloud Computing Expo, NYC to
>> attend a live session by Head of Impetus Labs on 'Secrets of Building a
>> Cloud Vendor Agnostic PetaByte Scale Real-time Secure Web Application on the
>> Cloud '.
>>
>> Looking to leverage the Cloud for your Big Data Strategy ? Attend Impetus
>> webinar on May 27 by registering at
>> http://www.impetus.com/webinar?eventid=42 .
>>
>>
>> NOTE: This message may contain information that is confidential,
>> proprietary, privileged or otherwise protected by law. The message is
>> intended solely for the named addressee. If received in error, please
>> destroy and notify the sender. Any use of this email is prohibited when
>> received in error. Impetus does not represent, warrant and/or guarantee,
>> that the integrity of this communication has been maintained nor that the
>> communication is free of errors, virus, interception or interference.
>
> ________________________________
> Write to us for a Free Gold Pass to the Cloud Computing Expo, NYC to attend
> a live session by Head of Impetus Labs on ‘Secrets of Building a Cloud
> Vendor Agnostic PetaByte Scale Real-time Secure Web Application on the Cloud
> ‘.
>
> Looking to leverage the Cloud for your Big Data Strategy ? Attend Impetus
> webinar on May 27 by registering at
> http://www.impetus.com/webinar?eventid=42 .
>
>
> NOTE: This message may contain information that is confidential,
> proprietary, privileged or otherwise protected by law. The message is
> intended solely for the named addressee. If received in error, please
> destroy and notify the sender. Any use of this email is prohibited when
> received in error. Impetus does not represent, warrant and/or guarantee,
> that the integrity of this communication has been maintained nor that the
> communication is free of errors, virus, interception or interference.
>



-- 
Sasha Dolgy
sasha.dolgy@gmail.com

Mime
View raw message