On Fri, Apr 23, 2010 at 3:03 PM, Benoit Perroud <ben...@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 <sikerasa...@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 <axqd...@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
>>
>>
>

Reply via email to