That'd be bloody wicked.
Julian.
Kyle Drake
Net Brew Design
http://www.netbrewdesign.com
>
> Tokyo Cabinet is a cool power tool, but it's not a relational
> database. It only does key/value store. I'm not sure there would be
> much of a point to making a DM interface, since you wouldn't be able
> to use most of the methods in it. I think it would be much easier to
> just write a set of model methods for getting/setting the data.
DataMapper is not just for relational databases: http://merbist.com/2008/09/29/write-your-own-custom-datamapper-adapter/
//jarkko
--
Jarkko Laine
http://jlaine.net
http://dotherightthing.com
http://odesign.fi
Check out my latest book, Unobtrusive Prototype, fresh off the
Peepcode oven:
http://peepcode.com/products/unobtrusive-prototype-js
DataMapper is not just for relational databases: http://merbist.com/2008/09/29/write-your-own-custom-datamapper-adapter/
On 23.10.2008, at 3.16, Kyle Drake wrote:
>
> Tokyo Cabinet is a cool power tool, but it's not a relational
> database. It only does key/value store. I'm not sure there would be
> much of a point to making a DM interface, since you wouldn't be able
> to use most of the methods in it. I think it would be much easier to
> just write a set of model methods for getting/setting the data.
//jarkko
--
Jarkko Laine
http://jlaine.net
http://dotherightthing.com
http://odesign.fi
If you're doing simple get/put of data, it's going to blow any SQL
server out of the water. But doing things like tables, foreign keys
and joins is just not possible. I don't have any specific benchmarks,
but I've seen tasks that take days on MySQL take seconds on DBMs like
Tokyo Cabinet. The difference for simple data store can be
substantial.
You can certainly write a DM adapter. But you wouldn't be able to use
most of the functionality. Even doing things like setting properties
would be pointless. DM is an Object Relational Mapper, but since the
database is not relational, the pieces don't fit. It's not to bash
Tokyo Cabinet or DM, they're both great tools. They're just designed
for fundamentally different things.
i'm really new to merb. everything is so astonishingly abstracted
that i'm having a hard time visualizing how to do "manual" labor (like
retrieving a marshalled object out of a dbm and doing something with
it).