Skip to main content

Posts

Showing posts from March, 2025

REFERENTIAL INTEGRITY & SQL CONSTRAINTS

  RDBMS CONCEPT REFERENTIAL INTEGRITY  Referential Integrity is a system of rules that a DBMS uses to ensure that relationships between records in related table are valid, and that users don't accidentally delete or change related data. Conditions to set Referential Integrity: ✓ The matching field from the primary table is a primary key or has a unique index ✓ The related fields have the same data type ✓ Both tables belong to the same database When referential integrity is enforced, given rules should be followed: ✓ One can't enter a value in the foreign key field of the related table that doesn't exist in the primary key of the primary table. ✓ One can't delete a record from a primary table, if matching records exist in related table. ✓ One can't change a primary key value in the primary table, if that record has related records. For example, suppose Table B has a foreign key that points to a field in Table A.  Referential integrity would prevent you from adding a ...

MySQL - ASSIGNMENT | 10th March 25

  MySQL DATABASE QUESTIONS GRADE XII 1.      What is a database? Name any two RDBMS softwares. 2.      Discuss features of SQL. 3.      Differentiate between ALTER and UPDATE statements. 4.      Elucidate the terms degree and cardinality of a relation. 5.      Answer the following questions on the basis of the given table: Admno             Name               Subject            Gender             Average 1001                 Amit                 Math         ...