Added db access code using the Database singleton implementation