Any API should validate the data once it recieves it, so if there is some invalid data the API will take an action before processing anything.
As of my understanding, SQL-based databases validate data once again according to some constraints.
Doesn't this cost more performance or am I not understanding correctly ?