couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@danmyersconsulting.com
Subject Re: include_docs with _all_docs
Date Wed, 09 May 2012 20:21:30 GMT
Jens,

1. If I don't know what attributes exist in the database there is no way
to write a query about those attributes on documents. I need to search or
browse the attributes so I know on what the universe is of the search
(same reason you need metadata for tables and columns in a relational
database). How would I achieve this in CouchDB?

2. If I create my own attribute of a document which stores metadata for
that document it works but if that metadata attribute isn't a required
attribute for all docs then how can I enforce the collection of metadata
which supports #1 above?

3. I can create a attribute that would provide a description of a
document, e.g.#2 above (aka metadata) but how do I create an attribute of
a document attribute? (e.g. an description for a document attribute called
"telephone", which is now an attribute of an attribute or meta-attribute)?

Dan M.
> On May 9, 2012, at 11:02 AM, <dan@danmyersconsulting.com>
> <dan@danmyersconsulting.com> wrote:
>
>> Isn't there
>> something that just gives me the list of attributes (metadata only) like
>> dictionary tables provide in relational databases? e.g. output would be:
>> "id","key","value","doc":{"_id","_rev","Name","Email","Notes"}
>
> Nope. And I’m having trouble thinking of a reason you’d want it … maybe if
> you explain why, we can suggest a Couch-like way of doing it. (For
> example, if you’re trying to find all documents that contain a particular
> attribute, you’d write a view to select those and then query that view.)
>
> —Jens



Mime
View raw message