linz / linz-lds-bde-schema

Table schema and supporting functions for the simplified and full Landonline layers and table on the LINZ Data Service. This repository was merged in to BDE Processor in latest master branch version !
Other
3 stars 2 forks source link

Generate model diagrams from database #274

Open l0b0 opened 2 years ago

l0b0 commented 2 years ago

We should automate the model generation so that we don't have to manually maintain the Visio files. One good tool is SchemaSpy.

palmerj commented 2 years ago

Note you will need foreign keys defined to do this from the database. However, adding FK will create performance overheads for the daily processing (Generally might be up to 30%, but this would need to be validated). Unfortunately PG doesn't have a way to define nocheck FK or disable them (although I think there might be a hack to disable all triggers on a table which will remove all K checks). First think would be to determine if adding the FK will dramatically impact the performance, testing deferred and non-deferred approaches.