[OSM-dev] Rantings about API 0.6

marcus.wolschon at googlemail.com marcus.wolschon at googlemail.com
Wed Feb 11 13:55:50 GMT 2009

On Wed, 11 Feb 2009 14:48:58 +0100, Iván Sánchez Ortega
<ivan at sanchezortega.es> wrote:
> El Miércoles, 11 de Febrero de 2009, Stefan de Konink escribió:
>> > I'm not a foreign keys guru myself but I think it may be difficult to
>> > have one with the relation_members as designed currently.
>> I have solved that by splitting the members in 3 distinct tables; but
>> placed an explicit index so I can always retrieve the members in the
>> order they were inserted.
> It can also be solved by nuking the "member_type" and "member_id"
> and 
> putting three new columns: "member_node_id", "member_way_id" 
> and "member_relation_id", all allowing NULL, with a foreign key to the 
> corresponding table, and with a cute custom constraint or even a view to
> make 
> sure two of these three columns are kept NULL.

I thought of exactly the same thing while reading El Miércoles post.


More information about the dev mailing list