You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Scott Mann <sd...@gmail.com> on 2010/07/22 18:56:38 UTC
Requesting data model suggestions
Hello,
Although, I've done a bit of reading about Cassandra's data model and
I've set up a Cassandra pair, I'm still unsure as to what might be
best for my purposes.
Briefly, I've got a set of strings A, B, and C. If needed, A could be
represented as an integer. Each A is associated with exactly one B or
C (but not both). A also has a number of parameters associated with it
which change over time. These changes, however, are reported with the
B or C identifier.
Currently, in mysql, I have three tables, A', B', and C' each using A,
B, and C as keys. When an update arrives, the code searches for the
key (B or C) in the appropriate table, determines the associated A
(using a foreign key), and then updates the values in the table row in
A' with key=A.
Anyone have ideas about how to model this in Cassandra?
Thanks!
--
-Scott
Re: Requesting data model suggestions
Posted by Thomas Boose <th...@boose.nl>.
Hello Scott,
6 month later but maybe you are still interested. I wrote an article on the
subject of migrating EERD models to Cassandra on the Cassandra wiki.
Have a look and tell me what you think of it:
http://wiki.apache.org/cassandra/ThomasBoose/EERD%20model%20components%20to%20Ca
ssandra%20Column%20family%27s?
action=fullsearch&context=180&value=linkto%3A%22ThomasBoose/EERD+model+component
s+to+Cassandra+Column+family%27s%22
Thanks in advance,
Thomas Boose
Re: Requesting data model suggestions
Posted by Benjamin Black <b...@b3k.us>.
Yes: ignore everything you are doing in your MySQL schema and don't
try to figure out how to map that to Cassandra. Figure out your
queries and work back from there.
On Thu, Jul 22, 2010 at 9:56 AM, Scott Mann <sd...@gmail.com> wrote:
> Hello,
>
> Although, I've done a bit of reading about Cassandra's data model and
> I've set up a Cassandra pair, I'm still unsure as to what might be
> best for my purposes.
>
> Briefly, I've got a set of strings A, B, and C. If needed, A could be
> represented as an integer. Each A is associated with exactly one B or
> C (but not both). A also has a number of parameters associated with it
> which change over time. These changes, however, are reported with the
> B or C identifier.
>
> Currently, in mysql, I have three tables, A', B', and C' each using A,
> B, and C as keys. When an update arrives, the code searches for the
> key (B or C) in the appropriate table, determines the associated A
> (using a foreign key), and then updates the values in the table row in
> A' with key=A.
>
> Anyone have ideas about how to model this in Cassandra?
>
> Thanks!
>
> --
> -Scott
>