Final Exam Review Flashcards - CIS 458

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

1/52

flashcard set

Earn XP

Description and Tags

This set of flashcards covers normalization principles, SQL commands and syntax (DDL, DML, DCL), and Transaction Management concepts based on the course lecture notes.

Last updated 1:23 AM on 5/15/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

53 Terms

1
New cards

What is defined as an anomaly in a database table?

is a problem caused by redundant data in a table.

2
New cards

Three types of anomalies

  1. Insertion

  2. Deletion

  3. Modification

3
New cards

Composite key

A primary key made up of two or more attributes that together uniquely identify a row in a table.

4
New cards

Functional dependency

Occurs when one attribute uniquely determines another attribute

Student ID → StudentName; One StudentID determines exactly one student name

5
New cards

Full dependency

A non-key attribute depends on the entire composite key.

(StudentID, CourseID) → Grade; Grade depends on both attributes together

6
New cards

Requirements for First Normal Form (1NF)?

Having no repeating groups and having atomic values (one value per cell).

7
New cards

Requirements for Second Normal Form (2NF)?

The table must be in 1NF and have no partial dependencies.

8
New cards

Requirements for Third Normal Form (3NF)?

The table must be in 2NF and have no transitive dependency for non-key attributes.

9
New cards

What are the three major functions of SQL?

  1. Data Definition Language (DDL)

  2. Data Manipulation Language (DML)

  3. Data Control Language (DCL)

10
New cards

Which SQL commands belong to Data Definition Language (DDL)?

CREATE, ALTER, and DROP.

11
New cards

Which SQL commands belong to Data Manipulation Language (DML)?

SELECT, INSERT, UPDATE, and DELETE.

12
New cards

Which SQL commands belong to Data Control Language (DCL)?

GRANT and REVOKE.

13
New cards

What elements are required when creating a table in SQL?

Each table must have a name and several attributes, and each attribute must have a name and a data type.

14
New cards

What is Structured Query Language (SQL)?

The language we use to create, manipulate, and maintain a relational database

15
New cards

What is Data Definition Language (DDL)?

Used to create, modify, and delete database objects

16
New cards

What is Data Manipulation Language (DML)?

Used to manipulate data

17
New cards

What is Data Control Language (DCL)?

Used to control user permissions

18
New cards

What is the DEFAULT constraint?

Provides automatic value if non entered

19
New cards

What is the NOT NULL constraint?

Must have a value

20
New cards

Transaction

A logical unit of work that must be entirely completed or aborted.

21
New cards

ACID properties of a transaction

  1. Atomicity

  2. Consistency

  3. Isolation

  4. Durability

22
New cards

What is the UNIQUE constraint?

Value must be unique and not duplicate

23
New cards

What are the types of locks used in concurrency control? —

  • Shared Lock

  • Exclusive Lock

24
New cards

What are the phases in Two-Phase Locking (2PL).

  • Growing Phase

  • Shrinking Phase

25
New cards

What is a deadlock?

Two transactions wait forever for each other's resources.

26
New cards

Partial dependency

A non-key attribute depends on only part of a composite key

(StudentID, CourseID) → StudentName; StudentName depends only on StudentID

27
New cards

Which form is this?

1NF

<p>1NF</p>
28
New cards

Which form is this?

2NF

<p>2NF</p>
29
New cards

Which form is this?

3NF

<p>3NF</p>
30
New cards

What is the PRIMARY KEY constraint?

Uniquely identifies each row

31
New cards

What is the FOREIGN KEY constraint?

References a primary key from another table

32
New cards

How to change the definition of tables?

ALTER table

33
New cards

What is the solutions for a deadlock?

  • Deadlock detection and recovery

  • Timeouts

  • Deadlock prevention.

34
New cards

Deadlock detection and recovery

Allows deadlocks occurs but detect them and recover

35
New cards

Timeouts

If transaction exceeds the time limit, it aborts/roll back

36
New cards

Deadlock prevention

Lock all records at the beginning at the transaction

37
New cards

Growing Phase

When the transaction acquires locks only (Lock Only Mode)

38
New cards

Shrinking Phase

When the transaction releases locks only (Unlock Only Mode)

39
New cards

Insertion Anomaly

Inconsistency when adding data

40
New cards

Deletion Anomaly

Inconsistency when removing data

41
New cards

Modification Anomaly

Inconsistency when updating data

42
New cards

Atomicity Property

All operations happen or nothing happens

43
New cards

Consistency Property

Database remains valid

44
New cards

Isolation Property

Transactions do not interfere

45
New cards

Durability Property

Committed changes are permanent.

46
New cards

Shared Lock

Allows reading but no updating and prevents exclusive locks

47
New cards

Exclusive Lock

No access permitted, used when preparing updates.

48
New cards

Alias

Temporary name for a column or table

49
New cards

Subquery

A query inside another query

50
New cards

Concurrency Control

Managing simultaneous transactions safety

51
New cards

Problems from simultaneous transactions?

  • Lost update

  • Dirty Read

  • Unrepeatable Read

52
New cards

Solutions to simultaneous transactions

Serializability

53
New cards

Serializability

Ensures transaction behave as if executed one at a time