Consider your
school’s registration database that enforces the following integrity
constraint: to enroll in a given class, the student must have completed or
currently be enrolled in the listed prerequisite (if any). Your school, in
fact, probably does have that integrity constraint in place. How can you get
around that integrity constraint and enroll in a class for which you are not
taking nor have completed the prerequisite? Is this an instance of when you
should be able to override an integrity constraint? What are the downsides to
being able to do so?
Integrity
constraints are rules that help ensure the quality of the information. In this
case, my school has an integrity constraint that in order to enroll in a given
class, the student must have completed or currently be enrolled in the listed
prerequisite. In order to get around the integrity constraint and enroll in a
class in which the prerequisite hasn’t been taken, you could use a foreign key.
A foreign key is a primary key of one file that appears in another file. I do
not believe this is an instance in which you should be able to override an
integrity constraint. The downside of being able to do so would allow you to
move forward in your education without knowing the material needed.
No comments:
Post a Comment