You may choose to validate the data that you enter in a table either, at the database level or at the application level.
Application level is feasible only if the source of data is the application. Many instances are present in which the data can be directly uploaded to the database from a script that will be time-saving.
MySQL supports ENUM and using the values for a particular column can be pre-defined during the table definition and this will be validated when the records are inserted or updated in the table.
Example:
CREATE TABLE GRADES ( NAME VARCHAR(40), GRADE ENUM('A', 'B', 'C', 'D', 'E'));
and now using the pre-defined values of the ENUM for column GRADE which can take values as defined.
Correct SQL:
INSERT INTO GRADES (NAME, GRADE) VALUES ('STUDENT 1', 'B'), ('STUDENT 2', 'A'), ('STUDENT 3', 'A'), ('STUDENT 4', 'B');
Incorrect SQL:
INSERT INTO GRADES (NAME, GRADE) VALUES ('STUDENT 5', 'G');