[Openstreetmap-dev] Re: New database schema for segments; keys and values?

SteveC steve at asklater.com
Wed Sep 21 11:41:02 BST 2005

This is what streets do?

I prefer the arbitrary text field we discussed to key/val

We're not going to avoid the slow searches

* @ 21/09/05 10:55:42 AM nick at hogweed.org wrote:
> Hello Steve and everyone,
> Been looking at the Ruby code for handling GPX upload. The current schema only 
> allows segments with two points, but multi-point segments would be better for 
> longer roads (that way, you can just pull all the points from one segment 
> using one query and do what you like with it).
> What do you think of the following alternative schema which would also handle 
> the keys and values?
> Segments table at the moment:
> uid, node_a, node_b, timestamp, user_uid, visible
> Revised schema for segments table?
> uid, timestamp, user_uid, visible, keyid, value
> A new table segment_nodes, to store the nodes of segments?
> segid : ID of parent segment
> nodeid: ID of node
> lat : Latitude
> lon: Longitude
> New table segment_keyvals, allowing addition of keys and values to segments?
> segid: ID of segment
> keyid: ID of key (see table below)
> value: Value of key
> New table keys
> id: Key ID
> name: Key name
> If this schema (or something similar) is acceptable, then I can start hacking 
> on this stuff.
> Nick

have fun,

SteveC steve at asklater.com http://www.asklater.com/steve/

More information about the dev mailing list