The Relational Model 1:
Introduction, QBE, and Relational Algebra
Solutions
Answers to Review Questions
Note: Answers to odd-numbered review questions are found in Appendix D of the textbook.
1. A relation is a two-dimensional table in which (1) the entries in the table are single-valued; (2) each column has a distinct name; (3) all of the values in a column are values of the same attribute; (4) the order of the columns is immaterial; (5) each row is distinct; and (6) the order of the rows is immaterial.
2. A relational database is a collection of relations.
3. An unnormalized relation is a structure that satisfies all the properties of a relation except the restriction that entries must be single-valued. It is not a relation.
4. Attribute is another term for a column in a table.
5. In the shorthand representation, each table is listed, and after each table, all the columns of the table are listed in parentheses. Primary keys are underlined. Branch (BranchNum, BranchName, BranchLocation, NumEmployees) Publisher (PublisherCode, PublisherName, City) Author (AuthorNum, AuthorLast, AuthorFirst) Book (BookCode, Title, PublisherCode, Type, Price, Paperback) Wrote (BookCode, AuthorNum, SequenceNum) Inventory (BookCode, BranchNum, OnHand)
6. To qualify a field name means to indicate the table to which it belongs by preceding the field name with the table name and a period. To qualify the Street field in the Customer table, you would enter Customer.Street.
7. The primary key is the column or collection of columns that uniquely identifies a given row. The primary key of the Branch table is BranchNum. The primary key of the Publisher table is PublisherCode. The primary key of the Author table is AuthorNum. The primary key of the Book table is BookCode. The primary key of the Wrote table is the concatenation (combination) of BookCode and AuthorNum. The primary key of the Inventory table is the concatenation of BookCode and BranchNum.
8.