create database function completely functional, database contains gft, cdc, and who data