incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dean Landolt" <d...@deanlandolt.com>
Subject Re: How to organize/differentiate Documents?
Date Wed, 16 Jul 2008 14:44:00 GMT
> I'm a little unclear on how to achieve a similar use case with couchdb. I
> guess I could create separate databases for Cars and Trucks, but that
> doesn't seem right; I'm dubious that the designers intended databases to be
> used like tables. In searching the mailing list I saw that some documents
> had a field named "type". That seems like a good way to differentiate
> document types; my hesitation there is that it just seems very ad-hoc; I'd
> be surprised if there's no more firmly established method for
> distinguishing
> between document types.


To build on this question a little, many times in a RDBMS setup you Car and
Truck would end up being three tables, with a Vehicle polymorphic table as
the base. I get how to distinguish cars vs. trucks, but what about when I
want to treat them the same, to treat them like Vehicles? I want to see all
Vehicles, without having to list each one out? I've seen how couch can do
joins, but it's still not apparent to me how to do inheritance.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message