changed db. changed parent_id to parent_uri and fixed some constraints