• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 3 fuera de 16 páginas
Examen

DAD220 Ch 3 Questions with Verified Correct Answers

Document preview thumbnail
Vista previa 3 fuera de 16 páginas

DAD220 Ch 3 Questions with Verified Correct Answers

Vista previa del contenido

DAD220 Ch 3 Questions with Verified Correct
Answers
Primary Key

A column, or group of columns, used to identify a row. In the Employee table below, the

primary key is ID because each employee has a unique employee ID. The primary key

usually appears on the table's left side, but the primary key's position is not significant to the

database.

The primary key is specified in SQL when the table is created.

Often, primary key values are used in the WHERE clause to select a specific row.

Alternate Key

If a table contains several unique columns, any unique column may be specified. A unique

column that is not the primary key is called an alternate key

Primary keys obey two rules

1. Values must be unique within the column. This rule ensures that each value identifies at

most one row.

2. Values may not be NULL. This rule ensures that each value identifies at least one row.

Together, the two rules ensure that each primary key value identifies exactly one row.

Name is a good primary key.

True

False

False. A new employee could have the same name.

A new employee can be added without an ID value. T F

,F Primary Key values cannot be NULL

A new employee can be added with ID 5384. T F

False. Primary keys cannot have duplicates

No alternate keys are present. T F

True. Two different employees may have the same name or salary. Since Name and Salary

might not be unique, the table has no alternate keys.

Simple Primary Key

A simple primary key consists of a single column

Composite Primary Key

A composite primary key consists of multiple columns. Composite primary keys are denoted

with parentheses. Ex: (ColumnA, ColumnB)

an employee may have several family members, so employee ID is not unique. The

composite primary key consists of the ID and Number columns, denoted (ID, Number).

Minimal Primary Key

In a minimal primary key, all columns are necessary for uniqueness. Ex: (ID, Number,

Relationship) is not minimal. Since (ID, Number) is unique, Relationship is unnecessary.

Composite primary keys obey three rule

1. Column values, when grouped together, must be unique. Ex: The combination (2538, 1) is

unique within (ID, Number).

2. Columns may not contain NULL.

3. Composite primary keys must be minimal.

The first two rules are similar to single-column primary keys.

, Can (ID, Relationship) be the primary key of Family? Y N

No. (ID, Relationship) cannot be the primary key because (6381, Daughter) is repeated.

Composite primary keys must be unique.

What is the primary key of the PhoneNumber table?

(Area code, Exchange, Number) is unique, non-null, and minimal, so (AreaCode, Exchange,

Number) is a primary key. Occasionally, a primary key includes all columns in a table.

Foreign Key

A foreign key is a column, or group of columns, that refer to a primary key. Non-NULL

foreign key values must match some value of the primary key. The data types of the foreign

and primary keys must be the same, but the names may be different.

The Manager column of the Department table below refers to the ID column of Employee, so

Manager is a foreign key.

Foreign keys do not obey the same rules as primary keys

1. Foreign key values may be repeated. Ex: Sales and Marketing have the same manager.

2. Foreign key values may be NULL. Ex: Technical support currently has no manager.

3. Non-NULL foreign key values must match some primary key value.

The data type of Manager and ID must be the same if manager is a foreign key of ID

which is primary key T F

True Manager is a foreign key, which refers to the ID primary key. Data types of foreign and

primary key must be the same.

NULL in the Manager column refers to a row of the Employee table with a NULL ID. T

F

Información del documento

Subido en
10 de octubre de 2026
Número de páginas
16
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$13.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
KenAli
2.6
(18)
Vendido
120
Seguidores
5
Artículos
25837
Última venta
6 días hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes