Hi @Manorama Malviya,
The Error Is due to the Delete Rule for User_Id Reference,

When you delete the record from User Entity it will affect all the other references with Delete Rule with protected, For example, You have a reference of User_Id on the Appointment entity with Protected rule, So if the deleting doctor have any existing Appointment this will raise a database exception.
So please make sure the Delete Rule of User_Id references from all Entities should not be protected.
Best Reguards,
Sreejith