Your databases will not be affected if you re-install.
Whenever you re-install Primavera P5/P6, the installation will overwrite only the P5/P6 software and not the databases. You data and projects will still be accessible from the newly installed software.