Chapter 4 Flashcards

1
Q

A data dictionary contains metadata - data about date.

A

True

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

Current relational database software generally provides only a system catalog (and not a data dictionary).

A

True

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

As rare as 1:1 relationships should be, certain conditions absolutely require their use.

A

True

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

____ logic, used extensively in mathematics, provides a framework in which an assertion (statement of fact) can be verified as either true or false.

A

Predicate

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

The relational model’s creator, E.F. Codd, used the term relation as a synonym for _____.

A

Table

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

Date attributes contain calendar dates stored in a special format known as the ____ date format.

A

Julian

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

In the relational model, ____ are important because they are used to ensure that each row in a table is uniquely identifiable.

A

Keys

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

The attribute B is ____ the attribute A if each value in column A determines one and only one value in column B.

A

Functionally Dependent On

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

A ____ key is any key that uniquely identifies each row.

A

Superkey

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

Controlled ____ makes a relational database work.

A

Redundancy

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

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

A

Secondary

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

All primary key entries are unique, and no part of a primary key may be ____.

A

Null

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

____, also known as RESTRICT, yields values for all rows found in a table that satisfy a given condition.

A

SELECT

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

The ____ constraint can be placed on a column to ensure that every row in the table has a value for that column.

A

Not null

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

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

A

UNION

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

A(n) ____ join links tables by selecting only the rows with common values in their common attribute(s).

A

Natural

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

In an outer join, the matched pairs would be retained and any unmatched values in the other table would be left ____.

A

Null

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

A ____ contains at least all of the attribute names and characteristics for each table in the system.

A

Data Dictionary

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

In a database context, the word ____ indicates the use of the same attribute name to label different attributes.

A

Homonym

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

The ____ relational type if the “relational model ideal.”

A

1:M

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
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

Primary

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

A(n) ____ is an ordered arrangement of keys and pointers.

A

Index

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

Codd’s Rule of ____ state:
Application programs and ad hoc facilities are logically unaffected when changes are made to the table structures that preserve the original tables values (changing order of columns or inserting columns).

A

Logical Data Independence

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

To make a new table using SQL, you would use the CREATE TABLE command with mandatory appropriate data types specified for each of the attributes in the table.

A

True

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

To permanently delete a table (its structure’s existence), including any and all data it may have populated within it, which would be the SQL DDL command to accomplish that:

A

DROP TABLE

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

The following single SQL command would actually define a structure and build a table, in this case for a table named COMPANY, within a relational database.
Also, it would not create any data within the table, but would be ready for SQL statements to follow up with populating the table given that it is now implemented.
Please assume syntax is correctly specified:

CREATE TABLE Company (
Co_Code INTEGER NOT NULL UNIQUE,
Co_Name VARCHAR(30) NOT NULL,
Co_Contact VARCHAR(30) NOT NULL,
Co_State CHAR(2) NOT NULL.
Co_Start_Dt DATE,
PRIMARY KEY (Co_Code) );

A

True

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

An ERM is dependent on the database type.

A

False

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

The word “entity” in the ER model corresponds to a table.

A

True

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

The ER diagram represents the conceptual database as viewed by the end user.

A

True

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

The ER model refers to a specific table row as an entity instance.

A

True

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

In both the Chen and Crow’s Foot models, an entity is represented with a rectangle containing the entity’s name.

A

True

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

Attributes are types of entities.

A

False

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

In the original Chen model, each attribute is represented using an oval with the attribute name connected to the entity with a line.

A

True

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

Software vendors have adopted the Chen representation because of its compact representation.

A

False

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

Attributes cannot share a domain.

A

False

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

In an ER diagram, primary keys are usually bolded.

A

False

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

Ideally, a primary key is composed of several attributes.

A

False

38
Q

All attributes are either simple or composite.

A

True

39
Q

All simple attributes are also single-valued.

A

False

40
Q

In the Chen model, a multivalued attribute is connected to the owning entity with a double line.

A

True

41
Q

Derived attributes are stored in a special database table.

A

False

42
Q

A relationship is identified by a name that describes the relationship.

A

True

43
Q

Cardinality expresses the minimum and maximum number of entity occurrences associated with one occurrence of the related entity.

A

True

44
Q

Connectivities and cardinalities are established by business rules.

A

True

45
Q

A weak relationship exists if the primary key of the related entity contains at least one primary key component of the parent entity.

A

False

46
Q

You should always load data from the 1 side of a 1:M relationship.

A

True

47
Q

The existence of a mandatory relationship indicates that the minimum cardinality is 0 or 1 for the mandatory entity.

A

False

48
Q

Relationships operate only in one direction.

A

False

49
Q

A recursive relationship is one in which a relationship can exist between occurrences of the same entity set

A

True

50
Q

The ERD represents the ____ database as viewed by the end user.

A

Conceptual

51
Q

Some ____ database modeling concepts can be expressed only using the Chen notation.

A

Conceptual

52
Q

The set of possible values for an attribute is a ____.

A

Domain

53
Q

In an ER diagram, primary keys are indicated by ____.

A

Underlining

54
Q

Ideally, an entity identifier is composed of ____ attribute(s).

A

One

55
Q

The ____ attribute(s) make up the primary key in the table definition:
CLASS (CRS_CODE, CLASS_SECTION, CLASS_TIME, CLASS_ROOM, PROF_NUM)

A

CRS_CODE

CLASS_SECTION

-CRS_CODE and CLASS_SECTION

There is no primary key

56
Q

A ____ attribute can be further subdivided to yield additional attributes.

A

Composite

57
Q

A ____ attribute is one that cannot be subdivided.

A

Simple

58
Q

____ attributes can have many values.

A

Multivalued

59
Q

Some attributes are classified as ____.

A

-simple

complex

defined

grouped

60
Q

Although the conceptual model can handle ____ relationhips and multivalued attribues, you should not implement them in the RDBMS.

A

1: 1
- M:N
1: M
1: N

61
Q

A derived attribute ____.

A

must be stored physically within the database

-need not be physically stored within the database

has many values

must be based on the value of three or more attributes

62
Q

A derived attribute is indicated in the Chen model by a ____.

A

dashed line

63
Q

A relationship is an association between ____.

A

entities

64
Q

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

A

(min,max)

65
Q

Another word for existence-independent is ____.

A

strong

66
Q

An entity is said to be ____-dependent if it can exist in the database only when it is associated with another related entity occurrence.

A

existence

67
Q

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

A

weak

68
Q

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

A

weak

69
Q

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

A

optionality

70
Q

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

A

(1,1)

71
Q

A ____ relationship exists when an association is maintained within a single entity.

A

unary

72
Q

A ____ relationship exists when two entities are associated.

A

binary

73
Q

____ relationships are most common.

A

binary

74
Q

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

A

recursive

75
Q

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

A

associative

76
Q

The following step occurs first in the process of building an ERD: ____.

A

Develop the initial ERD.

-Create a detailed narrative of the organization’s description of operations.

Identify the attributes and primary keys that adequately describe the entities.

Identify the business rules based on the description of operations.

77
Q

The M:N relationship between STUDENT and CLASS must be divided into two 1:M relationships through the use of the ENROLL entity; the ENROLL entity is ____.

A

weak

78
Q

Complex ____ requirements may dictate data transformations, and they may expand the number of entities and attributes within the design.

A

information

79
Q

If Tiny College had some departments that were classified as “research only,” they would not offer courses; therefore, the COURSE entity would be ____ to the DEPARTMENT entity.

A

optional

80
Q

A ____ relationship exists when an association is maintained within a single entity.

A

unary

81
Q

A ____ relationship exists when three entities are associated.

A

ternary

82
Q

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

A

recursive

83
Q

The associative entity is also known as a ____ entity.

A

composite

84
Q

If Tiny College had some departments that were classified as “research only,” they would not offer courses; therefore, the COURSE entity would be ____ to the DEPARTMENT entity.

A

optional

85
Q

If the focus is on data-retrieval speed, you might also be forced to include ____ attributes in the design, which would not ordinarily be done.

A

derived

86
Q

Which of the following is used to select partial table contents?

A

SELECT
FROM
BY ;

LIST
FROM
BY ;

-SELECT
FROM
WHERE ;

LIST
FROM
WHERE ;

87
Q

Which query will output the table contents when the value of V_CODE is not equal to 21344?

A

-SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE <> 21344;

SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE <= 21344;

SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE = 21344;

SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
FROM PRODUCT
WHERE V_CODE => 21344;

88
Q

Which query will output the table contents when the value of the character field P_CODE is alphabetically less than 1558-QW1?

A

-SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICE
FROM PRODUCT
WHERE P_CODE

89
Q

The following two SQL commands would create 2 tables and would also create a relationship between the two tables with referential integrity. These two table definitions would also mean the following:
A Company can have many Products, a Product can only have one Company, and a
Company specified within a product must match a Company by its Company ID, Co_Code.
Please assume syntax is correctly specified:

CREATE TABLE Company
Co_Code INTEGER NOT NULL UNIQUE,
Co_Name VARCHAR(30) NOT NULL,
Co_Contact VARCHAR(30) NOT NULL,
Co_State CHAR(2) NOT NULL.
Co_Start_Dt DATE,
PRIMARY KEY (Co_Code) );

CREATE TABLE Product
P_Code VARCHAR(10) NOT NULL UNIQUE,
P_Desc VARCHAR(30) NOT NULL,
P_InDate Date NOT NULL,
P_QOH Smallint NOT NULL.
P_Price NUMBER(8,2),
Co_Code INTEGER,
PRIMARY KEY (P_Code),
FOREIGN KEY (Co_Code) REFERENCES Company (Co_Code) ;

A

True

90
Q

Which of the following INSERT commands would not execute, in the sequence given, not because of bad syntax, but because of a bad value specified.
There have been no other INSERT commands given previously to the heretofore empty tables.

CREATE TABLE Company
Co_Code INTEGER NOT NULL UNIQUE,
Co_Name VARCHAR(30) NOT NULL,
Co_Contact VARCHAR(30) NOT NULL,
Co_State CHAR(2) NOT NULL.
Co_Start_Dt DATE,
PRIMARY KEY (Co_Code) );

CREATE TABLE Product
P_Code VARCHAR(10) NOT NULL UNIQUE,
P_Desc VARCHAR(30) NOT NULL,
P_InDate Date NOT NULL,
P_QOH Smallint NOT NULL.
P_Price NUMBER(8,2),
Co_Code INTEGER,
PRIMARY KEY (P_Code),
FOREIGN KEY (Co_Code) REFERENCES Company (Co_Code) ;

A

INSERT INTO Company
Values ( 31439, ‘Leath and Sons’, ‘Ian Leath’, ‘Mi’, ‘19-Jan-00’ );

INSERT INTO Product
Values ( ‘16T-LJB’, ‘Top-Line JunkBin’, ‘29-Mar-18’, 57, 99.49, 31439 );

-INSERT INTO Product
Values ( ‘16T-LJBC’, ‘Top-Line JB Cover’, ‘29-Mar-18’, 57, 7.99, 31440 );

No issues, the 3 above INSERT commands all execute