database class updates

Added system level mydqldump functionality and also patstudykey
refactoring.