Chapter 3 Solution
Chapter 3 Solution
Chapter 3 Solution
Ans: In the CREATE TABLE statement, primary keys and related foreign
keys along with referential integrity constraints represent 1-M relationships.
In the Access Relationship window, a line connecting two tables represents a
1-M relationship. The relationship line connects the parent or 1 table (the
primary key table) with the child or M table (the foreign key table). The
symbol of 1 is presented at the end of the line connected to the 1 table.
The symbol of is presented at the other end of the line connected to the
M table.
14. How is an M-N relationship represented in the Relational Model?
Ans: An M-N relationship cannot be directly represented in the Relational
Model. Two 1-M relationships and a linking or associative table represent an
M-N relationship.
15. What is a self-referencing relationship?
Ans: A self-referencing relationship is a relationship in which a foreign key
refers to the same table. Self-referencing relationships represent associations
among members of the same set.
16. How is a self-referencing relationship represented in the Relational
Model?
Ans: In the CREATE TABLE statement, a foreign key referring to the
primary key of the same table along with a referential integrity constraint
represents a self-referencing relationship. In the Access Relationship window,
a self-referencing relationship is represented indirectly in the Relational
Model. A relationship line of the self-referencing relationship table is linked
to itself in a copied table, which is not a real table as it is created only inside
the Relationship Window. For example, in the University Database, the selfreferencing relationship for Faculty is represented as a relationship between
the Faculty and Faculty_1 tables. Faculty_1 is not a real table.
17. What is a referenced row?
Ans: Referenced rows are rows in a parent table of a 1-M relationship. A row
is referenced if there are rows in a child table with foreign key values identical
to the primary key value of the parent table row.
18. What two actions on referenced rows can affect related rows in a child
table?
Ans: The two actions are deleting a referenced row and updating the primary
key of a referenced row.
19. What are the possible actions on related rows after a referenced row is
deleted or its primary key is updated?
Ans: The possible actions are: restrict (do not allow the operation on the
referenced row), cascade (perform the same action on the related rows),
nullify (set the foreign values in related rows to null), and default (set the
foreign values in related rows to a default value).
20. Why is the restrict action for referenced rows more common than the
cascade action?
Ans: Because the restrict action helps maintain a degree of accuracy between
tables. The restrict action prevents a user from deleting records from a
primary key (referenced) table when there are associated records in a foreign
key (referencing) table. For example, in the University Database, a user
cannot delete a course if there related no related offering. The restrict action
also prevents users from changing primary key values that would result in
orphan records. For example, a faculty primary key should not be changed if
there are related faculty in offering; otherwise the offering will result in a
record with an unassigned faculty.
21. When is the nullify action not allowed?
Ans: The nullify action is not permitted if the foreign key does not allow null
values.
22. Why study the operators of relational algebra?
Ans: Knowledge of the operators can improve your query formulation skills.
The operators are the fundamental ways to retrieve data from a relational
database. To help you become proficient in query formulation, you should
understand the purpose and inputs of each operator.
23. Why are the restrict and project operators widely used?
Ans: Because users often want to see a subset rather than an entire table, these
operators are widely used. These operators are also popular because they are
easy to understand.
24. Explain how the union, intersection, and difference operators for tables
differ from the traditional operators for sets.
Ans: The union, intersection, and difference operators for tables operate in the
same way as the traditional operators for sets. The only difference is that the
table operators to rows of a table. Compatibility is a new concept for the table
operators as compared to the traditional set operators. With the table
operators, both tables must be union compatible because all columns are
compared.
25. Why is the join operator so important for retrieving useful information?
Ans: Because information resides in different tables, combining tables is
important. The join operator is used for combining tables to retrieve
information from different tables.
26. What is the relationship between the join and the extended cross product
operators?
Ans: The extended cross product operator is a building block for the join
operator.
27. Why is the extended cross product operator used sparingly?
Ans: The extended cross product operator can combine any two tables. Other
table combining operators have conditions about the tables to combine.
Because of its unrestricted nature, the extended cross product operator can
produce tables with excessive data.
28. What happens to unmatched rows with the join operator?
Ans: Unmatched rows are removed from the result of the join operator.
Unmatched rows are included in the result of the full outer join operator.
29. What happens to unmatched rows with the full outer join operator?
Ans: Unmatched rows from both input tables are included in the result of the
full outer join operator.
30. What is the difference between the full outer join and the one-sided outer
join?
Ans: Full outer join includes the nonmatching rows from both tables. The
one-side outer join includes the nonmatching rows from the designated input
table.
Ans: Visual tools allow a user to select the tables to combine. The join
conditions are determined by the tool. The user can change the join condition
in unusual situations when different join conditions should be used.
39. Why are non-minimal superkeys typically ignored?
Ans: Non-minimal superkeys are usually ignored because they are common
and contain columns that do not contribute to the uniqueness property.
40. What are two interpretations for null values?
Ans: A null value can be interpreted as unknown or inapplicable. An
unknown value may reflect poor data collection procedures or the user not
recalling the value. An inapplicable value does not apply to a row such as the
spouse name is not applicable to unmarried customers.