Hook up to db.