Skip to content
Question 40 of 40
Q.

Consider the following tables PARTICIPANT and ACTIVITY and answer the questions that follow :

Table : PARTICIPANT

ADMNONAMEHOUSEACTIVITYCODE
6473Kapil ShahGandhiA105
7134Joy MathewBoseA101
8786Saba AroraGandhiA102
6477Kapil ShahBoseA101
7658Faizal AhmedBhagatA104

Table : ACTIVITY

ACTIVITYCODEACTIVITYNAMEPOINTS
A101Running200
A102Hopping bag300
A103Skipping200
A104Bean bag250
A105Obstacle350

When the table “PARTICIPANT” was first created, the column ‘NAME’ was planned as the Primary key by the Programmer. Later a field ADMNO had to be set up as Primary key. Explain the reason. OR Identify data type and size to be used for column ACTIVITYCODE in table ACTIVITY.

Uttar Pradesh UpmspCBSE Class XII Board 2019Subjective· 2mImportance★★★★★
100% · 40/40 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

Part (a): NAME is not unique ("Kapil Shah" repeats), so ADMNO — which is unique — was made the primary key.

Part (b): ACTIVITYCODE is a fixed 4-character code, so CHAR(4) (size 4) is the right data type.

Part (a) — why ADMNO replaced NAME as the primary key

A primary key has two mandatory properties: uniqueness (no two rows share the value) and non-nullability (every row has a value). The programmer first picked NAME, but the data breaks the uniqueness rule:

ADMNO   NAME
6473    Kapil Shah
6477    Kapil Shah   <- same NAME as ADMNO 6473
``` …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.