Skip to content

Instantly share code, notes, and snippets.

@jarus
Last active August 29, 2015 14:06
Show Gist options
  • Save jarus/e9f3d7e2fe2730eed85a to your computer and use it in GitHub Desktop.
Save jarus/e9f3d7e2fe2730eed85a to your computer and use it in GitHub Desktop.

Tables

Nodes

  • id (big int)
  • meta (jsonb)
  • tags (jsonb)
  • lat
  • lng

Ways

  • id (big int)
  • meta (jsonb)
  • tags (jsonb)

WaysMembers (Könnte auch ein Array sein, wenn Anfragen weiterhin performen)

  • way_id (big int)
  • node_id (big int)
  • order (int)

Relations

  • id (big int)
  • meta (jsonb)
  • tags (jsonb)

RelationMembers

  • relation_id (big int)
  • type (n, w, r)
  • id (big int)
  • role (varchar)
  • order (int)

Anfragen

  • Von Way auf alle Nodes die im Way beinhaltet sind
  • Von Relation auf alle Members
  • Von Node auf Ways, die die Node beinhalten
    • Bin hier nicht sicher ob wir es brauchen, weil wenn sich Node geändert hat wurde der Way auch verändert.
  • Von Node auf Relation, die die Node beinhaltet
    • Relations werden aber nicht als Verändert makiert wenn sich die Node verändert hat.
  • Von Way auf Relation, die den Way enthält
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment