Page 308 - IT 402 v2.0 class 10
P. 308
. hat is eferential Integrity xplain its two any purposes. S Sample aper
ns. eferential Integrity is used to maintain accuracy and consistency of data in a relationship. In ase data can
be linked between two or more tables with the help of primary key and foreign key constraints.
eferential integrity helps to avoid:
. ecords can be added to a related table, if there is no associated record available in the primary key
table.
2. he values can be modified in a primary if any dependent records are present in the associated table s .
3. Deleting records from a primary key table if there are any matching related records available in associated
table s
. Identify the columns and data types of a table: irlines. Mention at least four columns with data type.
S Sample aper
Ans. Columns Data type
Flight No ext
No.of Passengers Integer
Airlines Text
Arrival Time Date/Time
Departure Time Date/Time
Fares Float
Cr itical T h ink ing
B. Application based questions:
. nswer the following uestions on the basis of following table:
Table : Student
Stud_id Stud_name Class Fees
1 Aman I 3000
2 Anil 3200
Table: Teacher
T_id T_name T_Sal Stud_id
3210 Mr. umar 60000 1
3211 Mr. Sethi 70000 2
i. Identify the primary key in Student and eacher table.
ii. Identify the foreign key in Teacher table.
ns. i. rimary ey in Student table : Stud id
rimary key in eacher table is : id
ii. Foreign key in eacher table is : Stud id
306 Touchpad Information Technology-X

