add all related entity and data to database