Ch. 3 & Ch. 4 Flashcards

1
Q

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.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A ____ key is defined as a key that is used strictly for data retrieval purposes.

a. lookup
b. foreign
c. candidate
d. secondary

A

d. secondary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Briefly describe a candidate key:

A

A candidate key can be described as a superkey without unnecessary attributes–that is, a minimal superkey.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Briefly explain why a data dictionary is necessary, and what should be included in a data dictionary.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

a. entity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

____ combines all rows from two tables, excluding duplicate rows.

a. INTERSECT
b. UNION
c. DIFFERENCE
d. SELECT

A

b. UNION

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

____ yields only the rows that appear in both tables.

a. INTERSECT
b. UNION
c. DIFFERENCE
d. SELECT

A

a. INTERSECT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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

A

d. natural

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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

A

b. null

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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

a. data dictionary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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

A

d. system catalog

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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

A

c. synonym

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

____ relational type is the “relational model ideal.”

a. 1:1
b. 1:M
c. M:1
d. M:N

A

b. 1:M

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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

A

c. primary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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

A

c. unique

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

A ____ should be a derived attribute.

a. person’s name
b. person’s age
c. person’s social security number
d. person’s phone number

A

b. person’s age

17
Q

In the ERD, cardinality is indicated using the ____ notation.

a. (max, min)
b. (min, max)
c. [min … max]
d. {min|max}

A

b. (min, max)

18
Q

Another word for existence-independent is ____.

a. weak
b. alone
c. unary
d. strong

A

d. strong

19
Q

When the PK of one entity does not contain the PK of a related entity, the relationship is ____.

a. missing
b. weak
c. strong
d. neutral

A

b. weak

20
Q

A ____ entity has a primary key that is partially or totally derived from the parent entity in the relationship.

a. strong
b. weak
c. existence-independent
d. relationship

A

b. weak

21
Q

The term “____” is used to label any condition in which one or more optional relationships exist.

a. participation
b. optionality
c. cardinality
d. connectivity

A

b. optionality

22
Q

The existence of a(n) ____ relationship indicates that the minimum cardinality is at least 1 for the mandatory entity.

a. mandatory
b. optional
c. multivalued
d. single-valued

A

a. mandatory

23
Q

The Crow’s foot symbol with two parallel lines indicates ____ cardinality.

a. (0,N)
b. (1,N)
c. (1,1)
d. (0,1)

A

c. (1,1)

24
Q

If an employee within an EMPLOYEE entity has a relationship with itself, that relationship is known as a ____ relationship.

a. self
b. self-referring
c. looping
d. recursive

A

d. recursive

25
Q

A(n) ____ entity is composed of the primary keys of each of the entities to be connected.

a. associative
b. recursive
c. unary
d. binary

A

a. associative