On Wed, May 7, 2008 at 10:10 AM, Raphael Studer <[EMAIL PROTECTED]> wrote: > > is there anything else that should be put in 0.6? Probably a good idea > > to talk about it now. > > There is something I have in mind since a long time. > Whats about creating a tag_key, tag_value and tags table? > > tag_key could be something like: > tag_key_id(int), tag_key(varchar) > > tag_value could be something like: > tag_value_id(int), tag_value(varchar) > > tags could be: > tag_id(int), tag_key(int->refto tag_key_id), tag_value (int->ref to > tag_value_id), version etc... > > The way_tags table could be changed to: > way_id, tag_id > > In the nodes table the tags field could be removed and a node_tags > table would be added: > node_id, tag_id > > What would be the advantages of this change, I have 3 in mind. > > 1. Database Size would be decrased, because tags are nod saved by each > way and node itself. > > 2. Typos could be minimized, because you could do an autocompletion > (as Potlatch have it at the moment) based on the these tables. You > also could show tags other ways/nodes used in combination with the tag > entered at the moment (like the amazon "customers buyed this, also > bought ...."). > > 3. A MediaWiki Plugin for the Map_Features could be created, with ALL > used tags. Therefor some more enhancemets on the tables would be > needed to store the description/images/etc for the tags. > > The Disatvantages: > Someone needs to do this. > > Please feel free to comment the idea.
You also have to realise just how many tags there are. On nodes and ways there are close to 1 billion tags, comprising of about 50 million distinct key-value pairs (this was the last time I counted which was a while back). So while you'd save on space, the table join to get the tags back wouldn't be that cheap. As far as typos go, well, the typos are in there too so they'd turn up in your autocomplete if you used it verbatim. You also have to separate out tags used on nodes, tags used on ways, and tags used on relations. As far as your map features extension goes, this wouldn't need to be real-time so it could be done on a different machine by processing the planet dump. I think there would be a lot of value in a site which could achieve something along the lines of an extended TagWatch, but you probably don't need an API change to do it. Dave _______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev

