It seems to be inspired by REST, and for some applications could be used instead of a RDMS.
Considering ActiveRecord has viewed databases such as MySQL a 'hash in the sky' by not supporting many features such as foreign key restraints etc etc, maybe it would be possible to create an active record adapter for SimpleDB?
I'm not an AR hacker, but hoping someone on this list is, and can provide some insight about the possibility...
It is certainly doable, but complicated by a couple of things.
SimpleDB has no schema ... you can PUT any Attributes in a Domain.
This means that you would have to have your schema described outside
of SimpleDB. There's no way of grabbing the attributes from a Domain -
attributes are always tied to an Item, but an Item doesn't have to
have attributes, so there is no guarantee that all possible attributes
will be returned with an Item.
Apart from the schema issue, I don't really see any particular
problems. AR is already abstracted from the underlying datastore, so
moving to SimpleDB should be relatively straight forward.
On Dec 15, 1:28 pm, "Eaden McKee" <eaden.mc...@gmail.com> wrote:
> It seems to be inspired by REST, and for some applications could be
> used instead of a RDMS.
> Considering ActiveRecord has viewed databases such as MySQL a 'hash in
> the sky' by not supporting many features such as foreign key
> restraints etc etc, maybe it would be possible to create an active
> record adapter for SimpleDB?
> I'm not an AR hacker, but hoping someone on this list is, and can
> provide some insight about the possibility...
On Sat, 2007-12-15 at 04:36 -0800, tobyhede wrote: > ...an Item doesn't have to have attributes, so there is no guarantee > that all possible attributes will be returned with an Item.
It does if you store a schema version at the "Item" level, and perform schema updates (attribute additions, modifications, deletions) on Items which are below the minimum acceptable schema version.
Well, a full-featured ActiveRecord adapter seems hard to achieve. I
recently completed work on a proxy server allowing ActiveResource
models to use SimpleDB as a datastore. Find the results here:
> It seems to be inspired by REST, and for some applications could be
> used instead of a RDMS.
> Considering ActiveRecord has viewed databases such as MySQL a 'hash in
> the sky' by not supporting many features such as foreign key
> restraints etc etc, maybe it would be possible to create an active
> record adapter for SimpleDB?
> I'm not an AR hacker, but hoping someone on this list is, and can
> provide some insight about the possibility...