Search notes:

OpenStreetMap: sqlite database

Schema

As of 2017-02-23
CREATE TABLE nod (
          id             integer primary key,
          lat            real not null,
          lon            real not null
        );

CREATE TABLE nod_way (
          way_id         integer not null,
          nod_id         integer not null,
          order_         integer not null
        );

CREATE TABLE nod_rel (
          nod_id         integer not null,
          rel_of         integer null,
          rol            text
        );

CREATE TABLE way_rel (
          way_id         integer not null,
          rel_of         integer null,
          rol            text
        );

CREATE TABLE rel_rel (
          rel_id         integer not null,
          rel_of         integer null,
          rol            text
        );

CREATE TABLE tag(
          nod_id         integer null,
          way_id         integer null,
          rel_id         integer null,
          key            text not null,
          val            text not null
        );

CREATE INDEX nod_way_ix_way_id on nod_way (way_id);
CREATE INDEX tag_ix_val        on tag     (     val);
CREATE INDEX tag_ix_key_val    on tag     (key, val);
CREATE INDEX tag_ix_nod_id     on tag     (nod_id);
CREATE INDEX tag_ix_way_id     on tag     (way_id);
CREATE INDEX tag_ix_rel_id     on tag     (rel_id);

See also

OpenStreetMap schema as png

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1745532639, '3.145.15.34', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/OpenStreetMap/database/index(85): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78