couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sarsale <mar...@malditainternet.com>
Subject designing a GIS app using couchdb
Date Thu, 19 Feb 2009 18:30:31 GMT
Heyas, I'm about to start my first couchdb app and I would like some
help designing the "document structure".

I would like to store Places and Events. A Place can be a Restaurant,
a MovieTheather or just a point in the map. An Event can be a special
dinner in the Restaurant, a movie in the MovieTeather, etc.

Storing Places sounds easy to me: I'll have a Type field which will be
something like ["Place","Restaurant"], a name and lat & long (probably
going to use geojson here) and some custom fields for each document
type.

Now, I'm not too sure what is the natural id of the Place documents:
the place name is an option, but probably there's going to be more
than one place with the same name. Any hints?

Then, the Event documents are not that obvious to me: since Events
occur in Places, a relationship between both is needed. I read about
the example with the blog comments and I thought I could apply
something similar here:

{
Type: 'Event',
PlaceID: 'TheatherX',
Name: "Pineapple Express"
}

What do you think? I'm also not sure about the natural ID for the
event. Help! :)

Also, I plan to support at  least some of the repeating features of
iCal (daily, weekly, yearly). I think this will be much easier to do
in couchdb than in a rdbms, but I would -love- to know if someone
implemented something similar.

I would appreciate if someone has pointers GIS + couchdb doc (I've
already found http://vmx.cx/cgi-bin/blog/index.cgi/category/CouchDB )

Thanks!

PD: bonus question, I'm planning to use Python and Django for the app,
what's the recommended couchdb module for py?



-- 
Martin Sarsale - martin@malditainternet.com

Mime
View raw message