Updated Database Design Final Exam Study Guide

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/23

flashcard set

Earn XP

Description and Tags

These flashcards cover essential concepts in database design, including normalization, SQL basics, and advanced topics for an exam review.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

24 Terms

1
New cards

What is a Functional Dependency?

Attribute B depends on A if each A maps to exactly one B.

2
New cards

What is a Transitive Dependency?

If A → B and B → C, then A → C, which violates 3NF.

3
New cards

What does 1NF stand for and what does it require?

1NF stands for First Normal Form and requires atomic values with no repeating groups.

4
New cards

What is the requirement for a table to be in 2NF?

The table must be in 1NF and have no partial dependency; the whole primary key must determine all attributes.

5
New cards

What is the criteria for a table to be in 3NF?

The table must be in 2NF and have no transitive dependencies.

6
New cards

What is BCNF and how does it differ from 3NF?

BCNF (Boyce-Codd Normal Form) is stricter than 3NF; for every functional dependency X → Y, X must be a superkey.

7
New cards

Provide an example of a BCNF violation.

Teacher → Course is a violation because Teacher isn’t a superkey.

8
New cards

What does 4NF require of a table?

No multivalued dependencies unless they're from a candidate key.

9
New cards

What does 5NF ensure regarding table decompositions?

No redundancy after joining decomposed tables; decomposing should not create or lose records.

10
New cards

What does the SELECT statement do in SQL?

It retrieves data from one or more tables.

11
New cards

What are aggregate functions in SQL?

Functions that perform calculations on a set of values, e.g., COUNT(), SUM(), AVG(), MAX(), MIN().

12
New cards

What are the different types of JOINS in SQL?

INNER, LEFT, RIGHT, FULL OUTER.

13
New cards

What is a subquery?

A query nested inside another query.

14
New cards

What is the difference between a non-correlated and a correlated subquery?

A non-correlated subquery runs once, while a correlated subquery runs for each row processed by the outer query.

15
New cards

What is a VIEW in SQL?

A virtual table created by a query that can be used like a regular table.

16
New cards

What types of indexes are there in SQL?

Clustered and Non-clustered indexes.

17
New cards

What is a stored procedure?

Stored SQL code that is compiled once and executed many times.

18
New cards

List one advantage of using stored procedures.

They provide security by allowing code execution on the server.

19
New cards

What does a Trigger do in SQL?

Stored code that automatically runs in response to certain events such as INSERT, UPDATE, or DELETE.

20
New cards

What are the possible events for a Trigger?

Triggers can respond to INSERT, UPDATE, and DELETE actions.

21
New cards

What do the isolation levels in database transactions define?

The degree to which the operations in one transaction are isolated from those in other transactions.

22
New cards

What is the purpose of a shared lock in database locking?

To allow multiple transactions to read a resource simultaneously.

23
New cards

What is a deadlock?

A situation where two transactions are waiting on each other, preventing both from proceeding.

24
New cards

What does Serializable isolation level provide?

Full isolation ensuring that transactions appear to be executed in a serial sequence.