are node and way IDs constistent across different map versions?


I’m trying to use some OSM Data within a database, and for performance reasons, XML data is transformed during copying to the database. As OSM data changes very often, there will be the need for an update procedure. Which leads me to the question, if ways and nodes with the same ID contain always the same data? I guess, there are 3 different possibilities

  1. IDs may change with each map release, deleted IDs may be reused.
  2. If data has changed, a new ID will be generated and the old one will never be reused.
  3. IDs stay the same, if data changes, but deleted ones will never be reused.

Which of this will happen? Or will anything else happen?

thanks in advance

OSM uses the first possibility afaik. But the same ID can be used for ways, points and relations.