Database

From OpenStreetMap Wiki
Jump to: navigation, search
Help
Available languages
English
Railsport DB scheme

The main database is a key component of OpenStreetMap, because obviously it's where we keep all our data.

Please note that this is not the only database used to generate maps. Have a look at Component overview to see what other databases exist.

The main database is accessed for editing via the API. If you want to get data see APIs for multiple available options.

Data model

The database contains tables for each Data Primitive (current, history, current_tags, history_tags), changeset, gpx_files, users, diary entries, sessions, oauth etc.

You can get an detailed look at the SQL statements at Rails port/Database schema.

Most applications only need the current map data. Keep in mind that a DB scheme is dedicated for a specific use case at a specific DBMS. Different OSM tools use different setups (Databases#Database_Schemas).

Postgres server instance

OpenStreetMap switched from MySQL to a PostgreSQL server for its main site on April 19 2009 [1] that is part of the rails port. This is running on a separate machine Servers/smaug. For problems see Platform Status.

Database statistics

As with all Servers we have munin stats for smaug.openstreetmap.org (realtime graphs showing server resource usage). See also Statistics.

Personal tools
Namespaces
Variants
Actions
site
Toolbox