Database connection

Setup example database connections and wrote the basic functions to do
this.