update dep, add fk contraints, more mapping