D426 Reading Tables

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/23

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 8:49 PM on 6/29/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

24 Terms

1
New cards
<p>What is returned?</p><p><code>SELECT Name<br>FROM Compensation<br>WHERE NOT(Salary &gt; 30000 AND Bonus &gt; 1000);</code></p>

What is returned?

SELECT Name
FROM Compensation
WHERE NOT(Salary > 30000 AND Bonus > 1000);

Nothing is returned.

For Lisa Ellison, 115000 > 30000 is TRUE but NULL > 1000 is NULL. NOT(TRUE AND NULL) evaluates to NOT(NULL). Since NOT(NULL) is NULL, Lisa Ellison is not selected.

Not to be confused with NOT NULL which returns values that are not NULL.

2
New cards
<table style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p>What do the double lines mean?</p><p>What do the double/single outline squares mean?</p><p>What do the underlined/dotted underlined attributes mean?</p><p>What are the PKs/Composite PKs?</p></td><td colspan="1" rowspan="1"><p>What do the squares, circles and diamonds mean?</p><p>What do double diamonds mean?</p><p>What is the partial key?</p><p>What are the strong/weak entities?</p></td></tr></tbody></table><p></p>

What do the double lines mean?

What do the double/single outline squares mean?

What do the underlined/dotted underlined attributes mean?

What are the PKs/Composite PKs?

What do the squares, circles and diamonds mean?

What do double diamonds mean?

What is the partial key?

What are the strong/weak entities?

Double lines mean the weak entity cannot exist without the strong entity.

Squares are entities, circles are attributes, diamonds are relationships.

Double squares are weak entities, single outline squares are strong entities.

Double diamonds are where the strong entity’s PK is part of the weak entity’s PK.

Underlined attributes are or are part of PKs, dotted underlined attributes are partial keys.

SecNum is the partial key. It uniquely identifies a section within a course.

PKs: CourseID, StudentID Composite PK: (CourseID, SecNum, Semester, Year)

Weak Entities: Section, Enrollment Strong Entities: Course, Student

3
New cards
<p>What is returned?</p><p><code>SELECT DISTINCT Language<br>FROM CountryLanguage<br>WHERE IsOfficial = 'F';</code></p>

What is returned?

SELECT DISTINCT Language
FROM CountryLanguage
WHERE IsOfficial = 'F';

Spanish and Balochi.

The DISTINCT keyword is used with a SELECT statement to return only unique or 'distinct' values

4
New cards
<p>What is returned?</p><p><code>SELECT Language<br>FROM CountryLanguage <br>ORDER BY Language;</code></p>

What is returned?

SELECT Language
FROM CountryLanguage
ORDER BY Language;

Fang, Mbete, Woleai, Yap

ORDER BY will list in ascending order. ORDER BY DESC will list in descending order.

5
New cards
<p>What is returned?</p><p><code>SELECT CountryCode, Language<br>FROM CountryLanguage <br>ORDER BY CountryCode, Language;</code></p>

What is returned?

SELECT CountryCode, Language
FROM CountryLanguage
ORDER BY CountryCode, Language;

FSM Woleai
FSM Yap
GAB Fang
GAB Mbete

ORDER BY goes in ascending order, starting with the CountryCode (FSM comes before GAB) and then the Language (Woleai comes before Yap, and etc.)

6
New cards
<p>What form is this table in?</p><p>A. Unnormalized</p><p>B. 1NF</p><p>C. 2NF</p><p>D. 3NF</p>

What form is this table in?

A. Unnormalized

B. 1NF

C. 2NF

D. 3NF

B. This table is still in 1NF because of partial dependencies. Item Name and Item Price depend only on part of the key.

7
New cards
<p>What form is this table in?</p><p>A. Unnormalized</p><p>B. 1NF</p><p>C. 2NF</p><p>D. 3NF</p>

What form is this table in?

A. Unnormalized

B. 1NF

C. 2NF

D. 3NF

C. The table is in 2NF but has a transitive dependency on Coordinator ID that must be resolved for 3NF.

8
New cards
<p>What form is this table in?</p><p>A. Unnormalized</p><p>B. 1NF</p><p>C. 2NF</p><p>D. 3NF</p>

What form is this table in?

A. Unnormalized

B. 1NF

C. 2NF

D. 3NF

A. This table has not been normalized because there are repeating groups and a multivalued field.

9
New cards
<p>What form is this table in?</p><p>A. Unnormalized</p><p>B. 1NF</p><p>C. 2NF</p><p>D. 3NF</p>

What form is this table in?

A. Unnormalized

B. 1NF

C. 2NF

D. 3NF

A. Because this table contains multiple non-unique rows it does not satisfy the criteria for any normal forms.

10
New cards
<p>What is the modality of appointment?</p><p>A. At least one</p><p>B. Dependent on the quantity</p><p>C. Two</p><p>D. Two or more</p>

What is the modality of appointment?

A. At least one

B. Dependent on the quantity

C. Two

D. Two or more

A. Modality is a description of the minimum number of values on one side of a relationship.

11
New cards
<p>Agents at the NWREA are assigned as a mentor to one other agent. Each NWREA mentor can only work with one agent. Each agent is only mentored by one PNREA agent. Being mentored is required, being a mentor is not. Which kind of relationship does the diagram depict?</p><p>A. Unary one-to-many</p><p>B. Binary many-to-many</p><p>C. Unary one-to-one</p><p>D. Binary one-to-many</p>

Agents at the NWREA are assigned as a mentor to one other agent. Each NWREA mentor can only work with one agent. Each agent is only mentored by one PNREA agent. Being mentored is required, being a mentor is not. Which kind of relationship does the diagram depict?

A. Unary one-to-many

B. Binary many-to-many

C. Unary one-to-one

D. Binary one-to-many

C. Because each mentor can only have one agent and each agent only one mentor, the relationship is Unary one-to-one.

When a table points at itself, it is unary.

12
New cards
<p>Agents at the NWREA may be assigned as a mentor to zero or more other agents. Each agent being mentored is mentored by only one NWREA agent. Which relationship does the diagram depict?</p><p>A. Unary one-to-many</p><p>B. Binary many-to-many</p><p>C. Unary many-to-many</p><p>D. Binary one-to-many</p>

Agents at the NWREA may be assigned as a mentor to zero or more other agents. Each agent being mentored is mentored by only one NWREA agent. Which relationship does the diagram depict?

A. Unary one-to-many

B. Binary many-to-many

C. Unary many-to-many

D. Binary one-to-many

A. A single table makes this a Unary relationship, and the outer icons indicate a max of 1 on one side and many on the other.

When a table points at itself, it is unary.

13
New cards
<p>You are creating a relational database to store info about instructors and the courses that each instructor teaches. Each course is taught by a single instructor. You have created an Instructor table and a Course table. Create a relationship between the Instructor table and the Course table. Keep duplicate data to a minimum. How would you do this?</p><p>A. Create a new column in the Instructor table.</p><p>B. Create new columns in the Instructors table for each course taught.</p><p>C. Create a new table that includes two columns.</p><p>D. Create a new column in the Course table</p>

You are creating a relational database to store info about instructors and the courses that each instructor teaches. Each course is taught by a single instructor. You have created an Instructor table and a Course table. Create a relationship between the Instructor table and the Course table. Keep duplicate data to a minimum. How would you do this?

A. Create a new column in the Instructor table.

B. Create new columns in the Instructors table for each course taught.

C. Create a new table that includes two columns.

D. Create a new column in the Course table

D. Create a new column in the Course table.

This is a One to Many binary relationship. To connect these two, add a foreign key on the MANY side. That means adding InstructorID as a foreign key in Course referencing Instructor InstructorID primary key.

14
New cards
<p>This table has these characteristics:</p><p>• Each student has a unique StudentID that references the Students table.</p><p>• A specific test can be taken more than once.</p><p>• Each instructor has a unique InstructorID that references the Instructors table</p><p>• Each student may take multiple tests on the same date.</p><p>• Each student may take tests on multiple dates.</p><p>What column or columns should you use for the primary key?</p><p>A. StudentID, Date</p><p>B. StudentID, Test, Date, InstructorID</p><p>C. StudentID, Test, and Date</p><p>D. Test</p>

This table has these characteristics:

• Each student has a unique StudentID that references the Students table.

• A specific test can be taken more than once.

• Each instructor has a unique InstructorID that references the Instructors table

• Each student may take multiple tests on the same date.

• Each student may take tests on multiple dates.

What column or columns should you use for the primary key?

A. StudentID, Date

B. StudentID, Test, Date, InstructorID

C. StudentID, Test, and Date

D. Test

C. Since StudentID and InstructorID are foreign keys and there are no other unique values, it is necessary to combine fields to form a Composite Primary Key.

Score and InstructorID allow Nulls, that means they can’t be part of a composite key or primary key.

Students can take multiple tests on one date, so StudentID and Date is not sufficient for uniqueness.

15
New cards
<p>Each teacher is associated with exactly one campus. The address in the table is the address for the campus where the teacher teaches.</p><p>What change is needed to normalize the database to the third normal form (3NF)?</p><p>A. Combine the FirstName and LastName columns into a single column.</p><p>B. Combine the Campus, Address, City, State, Country, and PostalCode columns into one column.</p><p>C. Create a separate table for campus address information. Use the Campus as the primary key. Add a TeacherID column to the table and relate it to the Teacher ID column in the Teachers table.</p><p>D. Create a separate table for campus address information. Use Campus as the primary key for the table. Create a foreign key in the Teachers table that relates teacher to the campus.</p>

Each teacher is associated with exactly one campus. The address in the table is the address for the campus where the teacher teaches.

What change is needed to normalize the database to the third normal form (3NF)?

A. Combine the FirstName and LastName columns into a single column.

B. Combine the Campus, Address, City, State, Country, and PostalCode columns into one column.

C. Create a separate table for campus address information. Use the Campus as the primary key. Add a TeacherID column to the table and relate it to the Teacher ID column in the Teachers table.

D. Create a separate table for campus address information. Use Campus as the primary key for the table. Create a foreign key in the Teachers table that relates teacher to the campus.

D. In the Teachers table, the address fields are related to the Campus field instead of the Primary Key TeacherID. Moving those fields to a new table using Campus as a primary key results in 3rd normal form.

16
New cards
<p>Which of the following is a partial dependency?</p><p>A. <code>PROJ_NUM --&gt; PROJ_NAME</code></p><p>B. <code>PROJ_NAME --&gt; HOURS</code></p><p>C. <code>PROJ_NUM, EMP_NUM --&gt; HOURS</code></p><p>D. <code>PROJ_NUM, EMP_NUM --&gt; PROJ_NAME</code></p>

Which of the following is a partial dependency?

A. PROJ_NUM --> PROJ_NAME

B. PROJ_NAME --> HOURS

C. PROJ_NUM, EMP_NUM --> HOURS

D. PROJ_NUM, EMP_NUM --> PROJ_NAME

A. PROJ_NUM --> PROJ_NAME shows a non-key field dependent on only one part of a composite primary key, resulting in a partial dependency.

17
New cards
<p>What is the modality of Volunteer?</p><p>A. Two or more<br>B. Two<br>C. Dependent on registration date<br>D. At least one</p>

What is the modality of Volunteer?

A. Two or more
B. Two
C. Dependent on registration date
D. At least one

D

18
New cards
<p>What is the correct way to read the modality on the right side of the association?</p><p>A. A maximum of one activity<br>B. A maximum of zero activities<br>C. A minimum of zero activities<br>D. A maximum of many activities</p>

What is the correct way to read the modality on the right side of the association?

A. A maximum of one activity
B. A maximum of zero activities
C. A minimum of zero activities
D. A maximum of many activities

C. Modality is a description of the minimum number of values on one side of a relationship.

19
New cards
<p>What is the E-R Diagram about an online pet food vendor showing?</p><p>A. An Invoice Line can include many Items.<br>B. An item can only be included in one Invoice Line.<br>C. One Invoice Line must include a minimum and a maximum of one Item.<br>D. The relationship between Item and Invoice Line is many-to-many.</p>

What is the E-R Diagram about an online pet food vendor showing?

A. An Invoice Line can include many Items.
B. An item can only be included in one Invoice Line.
C. One Invoice Line must include a minimum and a maximum of one Item.
D. The relationship between Item and Invoice Line is many-to-many.

C. Since the line representing the relationship has 2 single | marks on the item side of the diagram, the item has both a minimum and maximum of one in the relationship.

20
New cards
<p>What is the E-R Diagram about an online pet food vendor showing?</p><p>An Invoice Line can include many Items.</p><p>An item can only be included in one Invoice Line.</p><p>One Invoice Line must include a minimum of one and a maximum of one Item.</p><p>The relationship between Item and Invoice Line is many-to-many.</p>

What is the E-R Diagram about an online pet food vendor showing?

An Invoice Line can include many Items.

An item can only be included in one Invoice Line.

One Invoice Line must include a minimum of one and a maximum of one Item.

The relationship between Item and Invoice Line is many-to-many.

One Invoice Line must include a minimum of one and a maximum of one Item.

The table relationship is One to Many Binary. It reads 1 item can be on many invoice lines. Many invoice lines can reference one item.

An item can be included in many invoice lines.

Invoice lines can reference one item

The relationship is One to Many Binary

21
New cards
<p>Which type of relationship exists between Student and Course in the diagram?</p><p>A. One-to-many binary<br>B. Many-to-many binary<br>C. One-to-many unary<br>D. Many-to-many unary</p>

Which type of relationship exists between Student and Course in the diagram?

A. One-to-many binary
B. Many-to-many binary
C. One-to-many unary
D. Many-to-many unary

B. Since the outer icon on both sides of the line representing the relationship is a “crow’s foot” and the relationship includes two entities, the relationship would be binary many-to-many.

Unary is only for tables pointing at itself.

22
New cards
<p>Which classification is correct for the box marked “Registration” in the given E-R Diagram?</p><p>A. Intersection data<br>B. Modality data<br>C. Cardinality data<br>D. Student data</p>

Which classification is correct for the box marked “Registration” in the given E-R Diagram?

A. Intersection data
B. Modality data
C. Cardinality data
D. Student data

A. The term intersection data refers to data which can be used to connect tables which do not share common fields by containing fields that are common to both other tables.

23
New cards
<p>Which classification is correct for the box marked “Registration” in the given E-R Diagram?</p><p>Intersection data</p><p>Modality data</p><p>Cardinality data</p><p>Student data</p>

Which classification is correct for the box marked “Registration” in the given E-R Diagram?

Intersection data

Modality data

Cardinality data

Student data

Intersection data

Intersection data is a table created between two entities to store their relationship.

Student data would be the Student table.

24
New cards
<p>Which type of relationship exists between Location and Item in the diagram?</p><p>A. One-to-many binary<br>B. Many-to-many binary<br>C. One-to-many unary<br>D. Many-to-many unary</p>

Which type of relationship exists between Location and Item in the diagram?

A. One-to-many binary
B. Many-to-many binary
C. One-to-many unary
D. Many-to-many unary

One-to-many binary. There are two tables.

Unary is only when there is one table and the table points to itself.