Ch. 3 & Ch. 4 Flashcards
Why are entity integrity and referential integrity important in a database?
a. Referential integrity ensures that each row is uniquely identified by the primary key.
b. Referential integrity means that, if the foreign key contains a value, that value refers to an existing valid tuple (row) in another relation.
c. Entity integrity means that, if the foreign key contains a value, that value refers to an existing valid tuple (row) in another relation.
d. Entity integrity ensures that each row is uniquely identified by the primary key.
b. Referential integrity means that, if the foreign key contains a value, that value refers to an existing valid tuple (row) in another relation.
d. Entity integrity ensures that each row is uniquely identified by the primary key.
A ____ key is defined as a key that is used strictly for data retrieval purposes.
a. lookup
b. foreign
c. candidate
d. secondary
d. secondary
Briefly describe a candidate key:
A candidate key can be described as a superkey without unnecessary attributes–that is, a minimal superkey.
Briefly explain why a data dictionary is necessary, and what should be included in a data dictionary.
It is important because it outlines your whole database. It allows your boss to see it and visualize what is in each table and what each attribute consists of. Data dictionary should include table name, attribute names, contents, type, format, domain, required, PK or FK, FK referenced table.
A CUSTOMER table’s primary key is CUS_CODE. The CUSTOMER primary key column has no null entries, and all entries are unique. This is an example of ____ integrity.
a. entity
b. referential
c. complete
d. null
a. entity
____ combines all rows from two tables, excluding duplicate rows.
a. INTERSECT
b. UNION
c. DIFFERENCE
d. SELECT
b. UNION
____ yields only the rows that appear in both tables.
a. INTERSECT
b. UNION
c. DIFFERENCE
d. SELECT
a. INTERSECT
A(n) ____ join links tables by selecting only the rows with common values in their common attribute(s).
a. equal
b. unique
c. foreign
d. natural
d. natural
In an outer join, the matched pairs would be retained and any unmatched values in the other table would be left ____.
a. in another table
b. null
c. out of the results
d. with matching values from the original table
b. null
A ____ contains at least all of the attribute names and characteristics for each table in the system.
a. data dictionary
b. relational schema
c. logical schema
d. join
a. data dictionary
The ____ is actually a system-created database whose tables store the user/designer-created database characteristics and contents. (BTW, in MySQL that database is named “information_schema.”)
a. meta dictionary
b. schema
c. data dictionary
d. system catalog
d. system catalog
In a database context, a(n) ____ indicates the use of different names to describe the same attribute.
a. entity
b. duplicate
c. synonym
d. homonym
c. synonym
____ relational type is the “relational model ideal.”
a. 1:1
b. 1:M
c. M:1
d. M:N
b. 1:M
Since it is used to link the tables that originally were related in a M:N relationship, the composite entity structure includes as foreign keys at least the ____ keys of the tables that are to be linked.
a. composite
b. super
c. primary
d. unique
c. primary
When you define a table’s primary key, the DBMS automatically creates a(n) ____ index on the primary key column(s) you declared.
a. key
b. incomplete
c. unique
d. primary
c. unique