Data validation refers to checking the content of data to ensure that it satisfi
ID: 3551298 • Letter: D
Question
Data validation refers to checking the content of data to ensure that it satisfies certain rules, known as constraints. For example, the employee name should never be omitted in the employee table, and the delivery date should be after (greater than) the order date.
Any interactive application, whether for opening a bank account, registering an online complaint, or filing income tax, has a form, web page, or static page that interacts with the user, and, typically, with a database. The form or web page is the front-end application, and the database is a back-end application.
The application can validate data either at the front end or at the back end. At the front end, you write code specific to controls in the form. For example, to enforce the rule that the employee name is required, you can disable the form's submit button when the value in the employee name text box is empty or blank. At the back end, you can apply a NOT NULL constraint to the employee name field in the employee table.
Consider the following:
What are the advantages and disadvantages of front-end and back-end validation?
In which specific situations would one technique of validation be preferred over the other?
Explanation / Answer
The advantages of front end validation are that the feedback going back to the person inputing the data is much faster. This is because the program does not need to access the database which would cost you time and more computational power. On the other hand back end validation while perhaps slower may yield more accurate results as it has an entire database at its disposal rather than just several lines of code doing some checks in the program itself. You can think of front end as the sales man giving you the information and back end as a request for the company which takes loger but is far more accurate.
Yes, as mentioned before sometimes data needs ot be more accurate so accessing the database would be a better option in that scenario, and the opposite is true as well sometimes the results need ot be faster o the front end validation would be applied instead.
Hope this helps, good luck.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.