Module2 Flashcards
Select all of the following that might be represented with a multivalued attribute. (Choose all that apply.)
a. Household phone numbers
b. A person’s first name
c. A flag’s color
d. The ISBN code for a book
e. A bank account balance
a. Household phone numbers
c. A flag’s color
Multivalued attributes are attributes that can have many values.
The ERD below represents a way to store a multivalued attribute, by storing each value that comprises the attribute in a single table. Select all statements that correctly describe this design.
a. If another variant such as VALUE4 needs to be added, the structure of the table must be modified, and this is disadvantageous.
b. If a particular instance of TABLE does not have some of the value variants, then a null must be inserted for that variant.
c. The above design does not work at all. That is, a multi-valued attribute cannot be stored this way.
d. This design is ideal for multivalued attributes that consist of more than 20 values, especially if most the values will be null.
A, B
Select all that are true of the different types of attributes. (Choose all that apply.)
a. A single-valued attribute is an attribute that has only a single value, such as the weight of a coin.
b. A multi-valued attribute is an attribute that can have many values at once, such as the colors of a flag.
c. A simple attribute can be subdivided into its composite parts, for example, a name attribute could be a simple attribute that is subdivided into first_name and last_name attributes.
d. A composite attribute is an attribute with more than one simple component. For example the simple attributes first_name and last_name can be combined to form the composite attribute name.
A, B, D
Select all statements that are good business rules for data modeling, that is, that are business rules that directly affect the structure of the database.
a. A machine operator will be working from home or from the office.
b. Casual Fridays take place in the summer.
c. A customer may make many payments on an account.
d. An account can be owned by many customers.
e. A training session cannot be scheduled for fewer than 10 employees or more than 30 employees.
C, D, E
As important as casual Fridays are, this business rule is not likely to effect entities, relationships and constraints within the database and does not effect the data modeling. Also, a machine operator working from home or the office will not effect the data modeling.
You are given the following business rules:
A person may own any number of credit cards, including none.
A credit card must be owned by exactly one person.
Choose which is true about the statement:
a
b. According to the business rules a person can have a maximum of 100 credit cards.
c. According to the business rules a person may own 15 credit cards.
d. This is a many-to-many (M:N) relationship
e. This is a one-to-many (1:M) relationship
f.
C, E, F
Select all that are true of a candidate key. (Choose all that apply.)
a. A candidate key is always a multi-attribute key.
b. A candidate key can be a foreign key.
c. A candidate key cannot be composite.
d. A primary key must be a candidate key.
e. A candidate key can be classified as a minimal superkey, that is, one that does not contain a subset of attributes that is itself a superkey.
B, D, E
A candidate key can be classified as a minimal superkey, that is, one that does not contain a subset of
attributes that is itself a superkey.
Select all that are true of cardinality in relation to databases. (Choose all that apply.)
a. Identifying cardinalities is an important part of a database designer’s job.
b. The Crow’s foot and UML diagrams place the cardinalities next to the entity to which cardinalities apply.
c. The existence of a mandatory relationship indicates that the minimum cardinality is at least 1 for the mandatory entity.
d. Cardinality expresses only the maximum number of entity occurrences associated with one occurrence of the related entity.
A, B, C
Select the correct SQL query that returns all records from PRODUCT where V_CODE does NOT equal 21344. (Choose all that apply.)
a. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE FROM PRODUCT
WHERE V_CODE =! 21344;
b. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE FROM PRODUCT
WHERE V_CODE == 21344;
c. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE FROM PRODUCT
WHERE V_CODE <> 21344;
d. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE FROM PRODUCT
WHERE V_CODE != 21344;
C, D
SQL is used to create tables and relationships in a DBMS. Select all which must be included in the SQL commands in order to completely and correctly create two well-designed tables with a foreign key relationship between them.
a. The table and column names must be defined.
b. The datatypes for each column must be defined.
c. The primary, unique, and foreign key constraints must be defined.
d. One dummy row must be inserted into each table to clarify to the DBMS how the tables are related.
A, B, C
A property management company has, as part of its database design, the following entity relationship diagram:
In this design, TENANCY can be described as (select all answers that are correct):
a. a weak entity
b. an entity whose instances cannot exist independently of Apartment instances
c. a strong entity
d. an entity that inherits part of its primary key from Apartment
A, B, D
In the context of a database table, the statement “A determines B” indicates that ____.
a. you need to know the value of attribute A in order to look up the value of attribute B
b. knowing the value of attribute A, you can look up the value of attribute B
c. knowing the value of attribute B, you can look up the value of attribute A
d. knowing the value of attribute A, you cannot look up the value of attribute B
e. you do not need to know the value of attribute A in order to look up the value of attribute B
A, B
A student was asked to create an ER diagram using Crow’s Foot notation given the following business rules:
- A car must have only one make.
- A make may be made into many cars.
- A make may never be made into a car.
The student created the following solution:
Identify all problems with this solution.
a. The leftmost symbol adjacent to the CAR entity should be the symbol.
b. The leftmost symbol adjacent to the CAR table should be the symbol.
c. The rightmost symbol adjacent to the CAR table should be the symbol.
d. The symbol adjacent to the MAKE table should be the symbol.
e. The symbol adjacent to the MAKE table should be the symbol.
B, C, D, E
View the ER diagram using Crow’s Foot notation below, and follow the subsequent instructions.
MANUFACTURER_ID in the PRODUCT table is _______________ (select all answers that correctly complete this sentence).
a. a primary key
b. an attribute reflecting controlled redundancy.
c. an attribute reflecting uncontrolled redundancy
d. a composite key
e. a foreign key
B
Select the correct entity relationship diagram which matches the requirements for the HOUSE and DOOR entities below:
- HOUSE and DOOR have an identifying relationship
- DOOR is a weak entity
- HOUSE is not considered optional to DOOR, and DOOR is not optional to HOUSE
A
Select all statements that correctly describe the Crow’s Foot notation in an ERD.
a. In Crow’s Foot notation, a many end of a relationship is indicated by a branching symbol similar to a
crow’s foot.
b. Crow’s foot notation is defined by the Unified Modeling Language (UML).
c. Crow’s Foot notation does not support any form of cardinality.
d.I n Crow’s Foot notation, an optional relationship between entities is shown by drawing a small circle on
the side of the optional entity.
A, D