Past ExamsRwanda ICT preparation

Topics / Database

Scores in an ExamResults table must be between 0 and 100. How can the database itself reject a score of 105 entered by mistake?

Les notes d'une table RésultatsExamens doivent être comprises entre 0 et 100. Comment la base elle-même peut-elle rejeter une note de 105 saisie par erreur ?

Answers
AWith an index on the Score column, which sorts out invalid valuesAvec un index sur la colonne Note, qui écarte les valeurs invalides
BWith a CHECK constraint such as CHECK (Score BETWEEN 0 AND 100)Avec une contrainte CHECK comme CHECK (Note BETWEEN 0 AND 100)
CBy making Score the primary keyEn faisant de Note la clé primaire
DBy using a viewEn utilisant une vue
The answer and explanation are in the full bank.

This question is one of 2,831 in the paid banks. Each comes with the correct answer and the reasoning behind it, not just a mark.

Unlock for 5,000 RWF

MIFOTRA exam practicealigned to Practice set: Database Management·2 marks·Medium

More Database questions