RDBMS Worksheet: Key Concepts and MCQs
RDBMS Worksheet: Key Concepts and MCQs
Referential integrity is a rule that ensures relationships between records in related tables remain valid . It requires that the values appearing in specified attributes of any tuple in the referencing relation also appear in specified attributes of at least one tuple in the referenced relation .
Cardinality is the total number of rows in a table, while degree refers to the total number of columns in a table .
Redundancy is considered a disadvantage because it leads to data inconsistency and can increase storage costs . In a file processing system, redundancy is a disadvantage as it contributes to data isolation and inconsistency .
A relational database organizes data as a collection of tables and supports data integrity and reduces redundancy and inconsistency compared to file processing systems, which are prone to data redundancy, isolation, and inconsistency .
Data constraints define valid data to prevent incorrect, null, or irrelevant entries, enhancing data integrity by ensuring accuracy, consistency, and reliability within the database . They enforce rules, such as primary key and foreign key constraints, to maintain structural reliability.
Metadata, or data about data, provides necessary information about other data, aiding in understanding, maintenance, and efficiency of data operations . It is crucial for managing and using data, ensuring it is correctly understood and manipulated.
If two columns are added to the table, the cardinality remains the same but the degree increases by two because the number of columns (degree) increases, while the number of rows (cardinality) does not change .
An attribute suitable to be a primary key should uniquely identify each tuple/row of the table, such as ID numbers . It must not permit null values and should remain stable, meaning its value cannot change over time.
The relational data model organizes data into tables with relationships enforced through keys, reducing redundancy by eliminating duplicate data and inconsistency by updating single data points across the database .
A foreign key is an attribute in a relation that is a primary key in another relation . It establishes and enforces a link between the data in two tables, ensuring that data remains consistent across those tables.