incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ned Wolpert <ned.wolp...@imemories.com>
Subject Re: ORM in Cassandra?
Date Fri, 23 Apr 2010 17:36:22 GMT
There is nothing wrong with what you are asking. Some work has been done to
get an ORM layer ontop of cassandra, for example, with a RubyOnRails
project. I'm trying to simplify cassandra integration with grails with the
plugin I'm writing.

The problem is ORM solutions to date are wrapping a relational database.
(The 'R' in ORM) Cassandra isn't a relational database so it does not map
cleanly.

On Fri, Apr 23, 2010 at 1:29 AM, aXqd <axqd001@gmail.com> wrote:

> On Fri, Apr 23, 2010 at 3:03 PM, Benoit Perroud <benoit@noisette.ch>
> wrote:
> > I understand the question more like : Is there already a lib which
> > help to get rid of writing hardcoded and hard to maintain lines like :
> >
> > MyClass data;
> > String[] myFields = {"name", "label", ...}
> > List<Column> columns;
> > for (String field : myFields) {
> >    if (field == "name") {
> >       columns.add(new Column(field, data.getName()))
> >    } else if (field == "label") {
> >      columns.add(new Column(field, data.getLabel()))
> >    } else ...
> > }
> > (same for loading (instanciating) automagically the object).
>
> Yes, I am talking about this question.
>
> >
> > Kind regards,
> >
> > Benoit.
> >
> > 2010/4/23 dir dir <sikerasakti@gmail.com>:
> >>>So maybe it's weird to combine ORM and Cassandra, right? Is there
> >>>anything we can take from ORM?
> >>
> >> Honestly I do not understand what is your question. It is clear that
> >> you can not combine ORM such as Hibernate or iBATIS with Cassandra.
> >> Cassandra it self is not a RDBMS, so you will not map the table into
> >> the object.
> >>
> >> Dir.
>
> Sorry, English is not my mother tongue.
>
> I do understand I cannot combine ORM with Cassandra, because they are
> totally different ways for building our data model. But I think there
> are still something can be learnt from ORM to make Cassandra easier to
> use, just as what ORM did to RDBMS before.
>
> IMHO, domain model is still intact when we design our software, hence
> we need another way to map them to Cassandra's entity model. Relation
> does not just go away in this case, hence we need another way to
> express those relations and have a tool to set up Keyspace /
> ColumnFamily automatically as what django's SYNCDB does.
>
> According to my limited experience with Cassandra, now, we do more
> when we write, and less when we read/query. Hence I think the problem
> lies exactly in how we duplicate our data to do queries.
>
> Please correct me if I got these all wrong.
>
> >>
> >> On Fri, Apr 23, 2010 at 12:12 PM, aXqd <axqd001@gmail.com> wrote:
> >>>
> >>> Hi, all:
> >>>
> >>> I know many people regard O/R Mapping as rubbish. However it is
> >>> undeniable that ORM is quite easy to use in most simple cases,
> >>> Meanwhile Cassandra is well known as No-SQL solution, a.k.a.
> >>> No-Relational solution.
> >>> So maybe it's weird to combine ORM and Cassandra, right? Is there
> >>> anything we can take from ORM?
> >>> I just hate to write CRUD functions/Data layer for each object in even
> >>> a disposable prototype program.
> >>>
> >>> Regards.
> >>> -Tian
> >>
> >>
> >
>



-- 
Virtually, Ned Wolpert

"Settle thy studies, Faustus, and begin..."   --Marlowe

Mime
View raw message