The DBMS can ensure consistency by enforcing all the constraints that have been specified on the database schema, such as integrity and enterprise constraints. However, in itself this is insufficient to ensure consistency.
For example, suppose we have a transaction that is intended to transfer money from one
bank account to another and the programmer makes an error in the transaction logic and
debits one account but credits the wrong account, then the database is in an inconsistent
state. However, the DBMS would not have been responsible for introducing this incon-
sistency and would have had no ability to detect the error.