A bit of sample code for DB connections and sessions