Question 9 of 12advanced🔧 ApplyCase Study6 marks

School uniform is available at M/s Sheetal Private Limited. They have maintained SCHOOL_UNIFORM Database with two relations viz. UNIFORM and COST. The following figure shows database schema and its state.

School Uniform Database Attributes and Constraints UNIFORM: UCode (Primary Key), UName (Not Null), UColor COST: UCode (Composite Primary Key), Size (Composite Primary Key), Price (>0)

Table: UNIFORM

UCodeUNameUColor
1ShirtWhite
2PantGrey
3SkirtGrey
4TieBlue
5SocksBlue
6BeltBlue
(a)

Can they insert the following tuples to the UNIFORM Relation? Give reasons in support of your answer. i) 7, Handkerchief, NULL ii) 4, Ribbon, Red iii) 8, NULL, White

(b)

Can they insert the following tuples to the COST Relation? Give reasons in support of your answer. i) 7, S, 0 ii) 9, XL, 100

Explanation

The question tests understanding of database constraints including Primary Key, Not Null, Check constraints, and Referential Integrity. In part (a), insertion fails if the Primary Key is duplicated or Not Null constraint is violated. In part (b), insertion fails if the Check constraint (Price > 0) is violated or if the Foreign Key references a non-existent record in the parent table (UNIFORM).