The key factors in data integrity are constraints, referential integrity and the delete and update options.
The main types of constraints in SQL are check, unique, not null, and primary constraints.
By practicing simple data validation rules, databases are more consistent, functional, and provide more value to their users.
When using SQL, data validation is the aspect of a database that keeps data consistent.
The not null constraint is placed on a column and states that data is required in that column.
However, in SQL, the not null constraint can only be placed on a single column.
Data validation is often a topic of great importance when it comes to databases.
Since information is constantly being updated, deleted, queried, or moved around, having valid data is a must.Referential integrity will prevent inputting data in the foreign key column that is not listed in the lookup table.However, the inserts and updates allowed by referential integrity occur when the data inserted is located in the lookup table.In addition, updates and deletes in the lookup table prevented by referential integrity occur when the data in the foreign key column of the data table is not present in the lookup table.Consequently, the inserts and deletes allowed by referential integrity come from data located in the lookup table.For example, a secondary school student is likely to be aged between 11 and 16.