db and relationships