Object based db access