Ways of validating data

Posted by / 20-Aug-2017 20:07

Ways of validating data

If the required property is set for a certain field but the user attempts to leave it blank, they will be prompted with an error message, requiring data to be entered before going any further. In computer science, data validation is the process of ensuring that data have undergone data cleansing to ensure they have data quality, that is, that they are both correct and useful.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.

However, in SQL, the not null constraint can only be placed on a single column.For example, a secondary school student is likely to be aged between 11 and 16.The computer can be programmed only to accept numbers between 11 and 16. However, this does not guarantee that the number typed in is correct.In addition to the updates and deletes authorized by referential integrity, there are three options associated with it: Restrict: this is the default value if no other option is set Set null: sets all matching in the foreign key column to null; all other values are unchanged Cascade: composed of two parts Deletes: an entire row is deleted from the data table when it matches a value in the foreign key column Updates: values in the foreign key column are changed to the new value; all other values are unchanged Data Validation is also a key in databases created through Microsoft Access.Data validation can be implemented during the design process of a database by setting data requirements for the user input to avoid errors.

ways of validating data-79ways of validating data-60ways of validating data-46

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.