Db connector and models