On 2020-01-04 09:59, Lorenzo Stucchi wrote:
> Thank you Pascal. This is can be more precise than just I looking at the
> visualisation [1].

I'm not aware of a comprehensive data model internals documentation
beyond the actual source code in
https://github.com/openstreetmap/openstreetmap-website, in particular
the app/*/api directory

> 
> But, for example, what is the “timestamp” in the “node" table? 

It refers to the current time in UTC when the node create/update/delete
operation was executed. Please see
https://github.com/openstreetmap/openstreetmap-website/blob/master/app/models/node.rb#L243


> And what is the “redactions” table? 

It contains a list of reasons why an object has been redacted, see
https://www.openstreetmap.org/redactions - the actual objects (such as
nodes, ways, relations) refer to this redaction table via the redaction_id.

 > Or, why in the “way_nodes” table there is
> “version", but also it is just a link to the “nodes” table that contains
> also the “version” attribute.

Basically there are two different sets of tables: the current_* ones,
and the historic ones. "way_nodes" belongs to the historic set of
tables, and you need the version attribute to know that a node was part
of say version 2 of way 12345. On the other hand, the current_way_nodes
table has no version attribute, as it assumes that it refers to the
latest version of an object.

> 
> For this reason, I was trying to look to an explanation of this schema
> if it exists.

I think one good way to find out more about those different tables is to
install a local version of the Rails port and do some edits via
iD/JOSM/Potlatch. The Rails port is quite verbose and lists every single
database operation on the console.


-- 


_______________________________________________
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev

Reply via email to