Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for 
change notification.

The following page has been changed by AlexanderKosenkov:
http://wiki.apache.org/couchdb/EntityRelationship

------------------------------------------------------------------------------
    "phones":[{"number":"(650) 555 - 2200","type":"home"},{"number":"(650) 555 
- 2201","type":"mobile"}],
  }
  }}}
+ 
+ or even
+ 
+ {{{
+ {
+   "_id":"Scott",
+   "type":"contact",
+   "name":"My Friend Scott",
+   "phones":[{"home":"(650) 555 - 2200"},{"mobile":"(650) 555 - 2201"}],
+ }
+ }}}
+ 
  Note how only the fields that we know are stored. Also note that the phone 
numbers are not simply an array, they are an array of associative hashes. We 
could extend this with no effort to add email addresses, IM names etc, even if 
IM names would need an extra attribute that has the service type. In essence, 
you're embedding child documents in the master document. That is the power of 
schema-less databases.
  
  == Many to Many ==

Reply via email to