Repository navigation
Question about current data model: building_id / geometry_id #1095
|
Hello everyone, @matkoniecz @polly64 we have the following database tables (selection): geometries
building_properties
buildings
also tables 'building_user_attributes' and 'building_user_likes' uses the 'building_id' for the internal reference within the database. Why there is no 'building_id' column in 'geometries' table, but instead a 'geometry_id'? Thanks in advance :-) best, traveller195 |
Replies: 6 comments 12 replies
|
The intention is that one building may have multiple geometries - in the building table we have: colouring-core/migrations/001.core.up.sql Line 28 in 1292876 so we can for example model multiple footprints of the same building changing over time. |
|
Hi @tomalrussell Two different cases came in my mind: the reference between table 'geometries' and 'buildings' is currently implemented by an foreign key 'geometry_id' within the 'buildings' table (like your given example). How is the link to 'older' building footprings modelled and linked with the buildings table? One option could be a foreign key placed in 'geometries' table for 'building_id'. Plus two further attributes 'lifecycle_start' and 'lifecycle_end' (datetime) for each buliding footprint. Or it could also stored in an additional join table, including lifecycle dates of the geometry. just to share some quick ideas (it is not important now to change it here, I guess) |
|
if this is helpful we should look to doing it together and making available in manual too |
|
great- yes we need something non-technical PI's like me can clearly understand |
|
additional note: |



Hi @traveller195
The intention is that one building may have multiple geometries - in the building table we have:
colouring-core/migrations/001.core.up.sql
Line 28 in 1292876
so we can for example model multiple footprints of the same building changing over time.