Relational Database Model: Keys, Relationships, and Integrity Rules
What structure does a table in a relational database have?
A 2D structure with rows (tuples) and columns (attributes).
What is the difference between a candidate key and a primary key?
A candidate key is a minimal superkey, while a primary key is a candidate key selected to uniquely identify rows.
Define a superkey.
A key that can uniquely identify any row in the table.
What is a secondary key?
A key used strictly for data retrieval purposes without requiring a functional dependency.
What is the difference between a one-to-one (1:1) and a one-to-many (1:M) relationship?
In a 1:1 relationship, one entity is related to one other entity, whereas in a 1:M relationship, one entity can relate to multiple entities.
What is the significance of the attribute domain?
It defines the specific range of values that a column can hold.
What is the importance of ensuring that all values in a column conform to the same data format?
It maintains data consistency and integrity within the database.
How does a left outer join function in SQL?
It returns all rows from the left table and the matching rows from the right table.
What is the typical relationship type in relational databases?
One-to-many (1:M) relationships.
What is the primary focus of the relational data model?
The logical representation of data and its relationships.
What is the significance of the order of rows and columns in a DBMS?
The order does not matter to the DBMS; it focuses on the data values themselves.
What is a foreign key?
The primary key of one table that has been placed in another table to establish a relationship.
What is Chen's notation used for?
To create entity-relationship diagrams (ERDs) that visually represent data relationships.
What is the role of business rules in database design?
To define the constraints and relationships that govern the data within the database.
What is the purpose of entity integrity?
To ensure all primary key entries are unique and not null.
What is the purpose of a data dictionary in a database?
To provide metadata and avoid confusion from homonyms and synonyms.
What is the purpose of normalization in database design?
To reduce data redundancy and improve data integrity.
What is the function of a relational diagram?
To visually represent the relationships between tables in a relational database.
What does the term 'tuple' refer to in a database context?
A row in a table representing a single entity occurrence.
What is a composite entity?
An entity created to resolve many-to-many (M:N) relationships by linking original entities.
What is a bridge or associative entity?
An entity that helps resolve many-to-many relationships by linking two original entities.
What does the term 'metadata' refer to in the context of databases?
Data that provides information about other data, such as structure and constraints.
What is the relationship between rows and columns in a table?
Each row represents a record, while each column represents an attribute of that record.
What does it mean for a table to have a unique identifier?
Each table must have an attribute or combination of attributes that uniquely identifies each row.
What are the two types of integrity rules in relational databases?
Entity integrity and referential integrity.
What is a primary key (PK)?
An attribute that uniquely identifies any given row in a table.
What is the role of SQL in database management?
SQL is used for querying and managing data in relational databases.
What does referential integrity ensure?
That a foreign key entry matches a primary key value in a related table.
