cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Krupansky <jack.krupan...@gmail.com>
Subject Re: CQL Data Model question
Date Tue, 12 May 2015 12:23:51 GMT
Porting an SQL data model to Cassandra is an anti-pattern - don't do it!
Instead, focus on developing a new data model that capitalizes on the key
strengths of Cassandra - distributed, scalable, fast writes, fast direct
access. Complex and ad-hoc queries are anti-patterns as well. I'll leave it
to DataStax staff to decide whether they feel that DSE Search/Solr can help
you on the complex and ad-hoc query front.

Tell us more about what business problem your SQL data model was trying to
accomplish. Get the business requirements sorted out before planning an
implementation.

You should also consider taking Cassandra data modeling training before
diving in yourself with a data model.

-- Jack Krupansky

On Mon, May 11, 2015 at 2:32 PM, Alaa Zubaidi (PDF) <alaa.zubaidi@pdf.com>
wrote:

> Hi,
>
> I am trying to port an Oracle Table to Cassandra.
> the table is a wide table (931 columns) and could have millions of rows.
>  name, filter1, filter2....filter30, data1, data2...data900
>
> The user would retrieve multiple rows from this table and filter (30
> filter columns) by one or more (up to 3) of the filter columns, it could be
> any of the filter columns.
> (select * from table1 where name = .. and filter1 = .. and filter5= .. ;)
>
> What is the best design for this in Cassandra/CQL?
>
> I tried the following:
> Create table tab1 (
> name text,
> flt1 text,
> flt2 text,
> flt3 text,
> ..
> flt30 text,
> data text,
> PRIMARY KEY (name, flt1, flt2, flt3, ..... flt30) );
>
> Is there any side effects of having 30 composite keys?
>
> Thanks
>
> *This message may contain confidential and privileged information. If it
> has been sent to you in error, please reply to advise the sender of the
> error and then immediately permanently delete it and all attachments to it
> from your systems. If you are not the intended recipient, do not read,
> copy, disclose or otherwise use this message or any attachments to it. The
> sender disclaims any liability for such unauthorized use. PLEASE NOTE that
> all incoming e-mails sent to PDF e-mail accounts will be archived and may
> be scanned by us and/or by external service providers to detect and prevent
> threats to our systems, investigate illegal or inappropriate behavior,
> and/or eliminate unsolicited promotional e-mails (“spam”). If you have any
> concerns about this process, please contact us at *
> *legal.department@pdf.com* <legal.department@pdf.com>*.*

Mime
View raw message