• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 16 pages
Exam (elaborations)

DAD220 Ch 3 Questions with Verified Correct Answers

Document preview thumbnail
Preview 3 out of 16 pages

DAD220 Ch 3 Questions with Verified Correct Answers

Content preview

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

Document information

Uploaded on
October 10, 2026
Number of pages
16
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$13.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
KenAli
2.6
(18)
Sold
120
Followers
5
Items
25837
Last sold
6 days ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions