While working on any application, it is very important to design it in such a way that it handles all scenarios, or at least provides user-friendly messages to users on what went wrong. We have already learned about exception handling in Chapter 7, Implementing Exception Handling, which can be handy in such scenarios.
While working on a database or distributed applications, data integrity plays a vital role.
Data integrity applies differently in different scenarios:
- For example, if you are creating an application and storing user information in a table, one of the principles you may adopt might be to not maintain duplicate users in the table so that they are uniquely identifiable. This is termed entity integrity.
- In a scenario where you are collecting demographic information, you may allow certain values, or ranges of values, in specific fields. This is termed...