keeps / dbptk-developer

DBPTK Developer - library and command-line tool for execution of database preservation actions
http://www.database-preservation.com
GNU Lesser General Public License v3.0
43 stars 19 forks source link

Database normalization features #616

Open daniel-skovenborg opened 4 months ago

daniel-skovenborg commented 4 months ago

Sorry, I know this is a very large pull request and that your guidelines encourage to ask before implementing new features. However, I urgently needed this feature enough to implement it, even if it will only ever live in my own fork. I am (for) now done with the task for which the code was designed and think it's ready to be adapted, if you want it.

Description

The Danish National Archives requires the database to be 1NF (exported as SIARD-DK). The following features allows exporting a database for this purpose without creating an auxiliary database.

The normalization configuration module currently has only the string pattern options implemented that I needed where my own requirements differed from what I deemed to be the proper default.

daniel-skovenborg commented 4 months ago

The code has only been tested on PostgreSQL. I believe I have written the array normalization SQL without non-standard features, though.