Much improved 5_Database_Functions.R