A school has a rule that each student must participate in a sports activity. So each one should give only one performance for sport activity. Suppose there are five students in a class, each having a unique roll number. The class representative has prepared a list of sports preferences as shown below. Answer the following:

a) Roll no 24 may not be interested in sports. Can a NULL value be assigned to that student’s preferences field?

Ans: Yes, a NULL value can be assigned.

b) Roll no 17 has given two preferences sports. Which property of relational DBMS is violated here? Can we use any constraint or key in the relational DBMS to check against such violation, if any?

Ans: “Each tuple in a relation is distinct” is the property of RDBMS is violated here. We can use Primary Key constraint in the RDBMS to check against such violation.

c) Kabaddi was not chosen by any student. Is it possible to have this tuple in the Sports Preferences relation?

Ans: No we cannot have this tuple in the relation because Roll No is a primary key field and it cannot have null values.

error: Content is protected !!