Working on the db layer.