Database Design - Week 7

24 July 2022
4.7 (114 reviews)
20 test answers

Unlock all answers in this set

Unlock answers (16)
question
In a/an ________________, a table can contain information about two or more entities. a. normalized data structure b. none of the above c. foreign key constraint d. unnormalized data structure
answer
unnormalized data structure
question
When you identify the data elements in a new database, you typically subdivide data elements into a. the largest practical components b. the smallest practical components c. components that can be easily parsed each time you use them
answer
the smallest practical components
question
Which of the following diagrams best represents the relationship between a table of students and a table of classes for which the student is registered?
answer
| Students/ StudentID, StudentName |--- ---<| StudentstoClasses/ StudentID, ClassID |>--- ---| Classes / StudentID, StudentName |
question
What do you use to uniquely identify each row in a table? a. a primary key b. a foreign key c. a skeleton key d. an index
answer
a primary key
question
When you subdivide a data element, you can easily rebuild it when necessary by ________________ the individual components. a. concatenating b. assigning c. updating d. matching
answer
concatenating
question
Typically, what form do most database designers consider a database structure to be normalized? a. fifth b. second c. fourth d. third
answer
third
question
The most common type of relationship between two tables is called what? a. one-to-many relationship b. one-to-one relationship c. primary relationship d. many-to-many relationship
answer
one-to-many relationship
question
To normalize a data structure, what do you apply in sequence? a. indexes b. normal forms c. composite indexes d. none of the above
answer
normal forms
question
To maintain ________________, if you delete a row in a primary key table, you must also delete any related rows in foreign key tables. a. referential integrity b. foreign key values c. foreign key restraints d. primary key restraints
answer
referential integrity
question
To enforce referential integrity, the database can a. return an error instead of doing the requested action b. do the requested action and do the related changes to the related tables c. do the requested action and mark any orphans in related tables d. a or b e. a or c
answer
a or b
question
Which of the following diagrams best represents the relationship between a table of customers and a table of orders placed by customers?
answer
| Customers / *CustomerID*, CustomerName |--- ---<| Orders / *OrderID*, CustomerID, OrderDate |
question
Which of the following is not a good guideline for deciding when to create an index for a column? a. The column is frequently used in search conditions or joins. b. The column is a foreign key. c. The column contains a large number of unique values. d. The column is frequently updated.
answer
The column is frequently updated.
question
Which of the following does not violate the referential integrity of a database? a. updating a foreign key with a value that doesn't match a primary key in the related table b. deleting a row in a foreign key table without deleting the related row in the related primary key table c. inserting a new row into a table with a foreign key that doesn't match a primary key in the related table d. updating a primary key in a primary key table without also updating the foreign keys for the related rows in all related tables
answer
deleting a row in a foreign key table without deleting the related row in the related primary key table
question
| Orders / OrderID, OrderDate |--- ---<| OrderLineItems / OrderID, OrderSequence, ProductID |>--- --- | Products / ProductID, ProductName | Which column or columns in each table should be defined as the primary key? a. Orders: OrderID and OrderDate OrderLineItems: OrderID and OrderSequence Products: ProductID b. Orders: OrderID OrderLineItems: OrderID Products: ProductID c. Orders: OrderID OrderLineItems: OrderID and OrderSequence Products: ProductID d. Orders: OrderID OrderLineItems: OrderID, OrderSequence, and ProductID Products: ProductID and ProductName
answer
Orders: OrderID OrderLineItems: OrderID and OrderSequence Products: ProductID
question
After you identify and subdivide all of the data elements for a database, you should group them by the entities with which they're associated. The entities will become the tables of the database, and the elements will become the a. cells b. indexes c. rows d. columns
answer
columns
question
If two tables have a many-to-many relationship, you need to define a _____________ table that relates their records. a. composite b. unique c. linking d. primary
answer
linking
question
What do you typically use to relate two tables that have a one-to-one relationship? a. indexes b. composite keys c. foreign keys d. primary keys
answer
primary keys
question
To apply the second normal form, you move columns that don't depend on the entire primary key to another table and establish a relationship between the two tables. This a. increases redundancy but makes the data more consistent b. increases redundancy but makes maintenance easier c. reduces redundancy and makes maintenance easier d. reduces redundancy but makes maintenance more difficult
answer
reduces redundancy and makes maintenance easier
question
To be in the first normal form, each cell in a table must contain a. a non-unique value b. a non-redundant value c. a unique value d. a single, scalar value
answer
a single, scalar value
question
To be in the third normal form a. each non-key column must depend only on the primary key b. each non-key column must depend on the entire primary key c. the non-key columns must not contain repeating values d. all of the above
answer
all of the above