Ans :
An error is said to have occurred if the execution of a command to manipulate the
database cannot be successfully completed either due to inconsistent data or due to
state of program. For example, there may be a command in program to store data in
database. On the execution of command, it is found that there is no space/place in
database to accommodate that additional data. Then it can be said that an error has
occurred. This error is due to the physical state of database storage.
Broadly errors are classified into the following categories:
1) User error: This includes errors in the program (e.g., Logical errors) as well as
errors made by online users of database. These types of errors can be avoided
by applying some check conditions in programs or by limiting the access rights
of online users e.g., read only. So only updating or insertion operation require
appropriate check routines that perform appropriate checks on the data being
entered or modified. In case of an error, some prompts can be passed to user to
enable him/her to correct that error.
2) Consistency error: These errors occur due to the inconsistent state of database
caused may be due to wrong execution of commands or in case of a transaction
abort. To overcome these errors the database system should include routines
that check for the consistency of data entered in the database.
3) System error: These include errors in database system or the OS, e.g.,
deadlocks. Such errors are fairly hard to detect and require reprogramming the
erroneous components of the system software.
Database errors can result from failure or can cause failure and thus will require
recovery. However, one of the main tasks of database system designers is to make
sure that errors minimized. These concepts are also related to database integrity and
have also been discusses in a later section.