SQL Practice Questions and Lecture Review

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

1/65

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering core SQL commands, database relationships, ACID properties, subqueries, and scalar/aggregate functions based on the transcript.

Last updated 9:54 PM on 9/20/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

66 Terms

1
New cards

Primary Key

A column or set of columns that uniquely identify each row of a table; must be unique and not null.

2
New cards

Foreign Key

A column (or columns) that references a column (most often the primary key) of another table to establish a relationship between records in separate tables.

3
New cards

Referential Integrity

Ensures that the foreign key in any referencing table must always refer to a valid row in the referenced table, keeping relationships synchronized during updates and deletes.

4
New cards

Inner Join

A join that returns only the rows that actually match based on the join predicate.

5
New cards

Outer Join

A join that returns rows that match as well as rows that are not common between both tables.

6
New cards

Composite Key

A combination of two or more columns in a table that can be used to uniquely identify each row in the table.

7
New cards

One-to-One (1:1) Relationship

A relationship between two tables where both tables should be associated with each other based on only one matching row.

8
New cards

DROP TABLE

An SQL statement that removes one or more table definitions and all data, indexes, triggers, constraints, and permission specifications for those tables.

9
New cards

DELETE Command

An SQL command used to remove rows from a table, requiring COMMIT or ROLLBACK to make permanent or undo, and firing DELETE triggers.

10
New cards

Entity-Relationship Diagram (ERD)

A data modeling technique that creates an illustration of an information system's entities and the relationships between those entities.

11
New cards

NOT NULL Constraint

An SQL constraint indicating that a column cannot store a NULL value.

12
New cards

HAVING Clause

An SQL clause that specifies a search condition for a group or an aggregate function used in a SELECT statement.

13
New cards

Normalization

The process of organizing data in a database by creating tables and establishing relationships to eliminate redundancy and inconsistent dependency.

14
New cards

UNION Operator

An SQL operator that returns only distinct rows that appear in either result set.

15
New cards

UNION ALL Operator

An SQL operator that returns all rows from combined queries without eliminating duplicate selected rows.

16
New cards

INTERSECT Operator

An SQL operator that returns only those rows returned by both queries.

17
New cards

Subquery (Nested Query)

A query within another SQL query embedded within the WHERE clause to return data used as a condition in the main query.

18
New cards

Orphaned Record

A record that references a key which no longer exists in the foreign table.

19
New cards

SELECT INTO

An SQL statement that selects data from one table and inserts it into a new table.

20
New cards

Cross Join

A join without a WHERE or ON clause that produces the Cartesian product of the tables involved in the join.

21
New cards

Cascade Delete

A foreign key setting where deleting a record in the parent table automatically deletes corresponding records in the child table.

22
New cards

ORDER BY

An SQL keyword used to sort the result-set by one or more columns in ascending order by default or descending order with DESC.

23
New cards

View

A virtual table in SQL based on the result-set of an SQL statement, containing fields from one or more real tables.

24
New cards

Index

A structure created in a table to allow the database application to find data fast without reading the whole table.

25
New cards

Scalar Function

An SQL function that operates on each individual row and returns a single value for that row.

26
New cards

Aggregate Function

An SQL function that operates on a set of rows to return aggregate calculated data.

27
New cards

Implicit Cursor

A context area memory space automatically created by Oracle whenever an SQL statement is executed without an explicit cursor.

28
New cards

Explicit Cursor

A programmer-defined cursor in PL/SQL created on a SELECT statement returning more than one row for control over the context area.

29
New cards

Common Table Expression (CTE)

A temporary named result set derived from a single SELECT, INSERT, DELETE, or UPDATE statement, defined using the WITH keyword.

30
New cards

DDL (Data Definition Language)

The SQL component used to define and modify database schema structure (includes CREATE, ALTER, DROP, TRUNCATE).

31
New cards

DML (Data Manipulation Language)

The SQL component used to add, change, and remove data in tables (includes INSERT, UPDATE, DELETE).

32
New cards

DQL (Data Query Language)

The SQL component used to retrieve and query data from the database (associated with SELECT).

33
New cards

DCL (Data Control Language)

The SQL component used to control access and privileges on database objects (includes GRANT, REVOKE).

34
New cards

TCL (Transaction Control Language)

The SQL component used to manage database transactions (includes COMMIT, ROLLBACK, SAVEPOINT).

35
New cards

Stored Procedure

Precompiled SQL code providing advanced database functionality and security for users without direct task access.

36
New cards

LIKE Command

An SQL command used to match string patterns in data retrieval queries.

37
New cards

JDBC

Java Database Connectivity, providing a connection between front-end Java applications and back-end databases.

38
New cards

Degree of a Relationship

The number of entity types participating in a relationship.

39
New cards

Binary Relationship

A relationship involving two entity types.

40
New cards

Ternary Relationship

A relationship involving three entity types.

41
New cards

Cardinality Ratio Constraint

A constraint specifying the maximum number of relationship instances that an entity can participate in (1:N, N:1, 1:1, M:N).

42
New cards

Participation Constraint

A constraint specifying the minimum number of relationship instances that each entity can participate in.

43
New cards

Total Participation

A constraint where every entity in the entity set must participate in at least one relationship instance.

44
New cards

Partial Participation

A constraint where not every entity is required to participate in the relationship.

45
New cards

Atomicity

An ACID property treating a transaction as a single, indivisible unit where either all operations succeed or none do.

46
New cards

Consistency (ACID)

An ACID property ensuring the database transitions from one valid state to another, adhering to all rules, constraints, and triggers.

47
New cards

Isolation

An ACID property guaranteeing that concurrent transactions do not interfere with each other, appearing as if executed sequentially.

48
New cards

Durability

An ACID property guaranteeing that once a transaction is committed, its changes are permanent despite system failures.

49
New cards

% Wildcard

An SQL wildcard character representing zero or more characters in a LIKE pattern.

50
New cards

_ Wildcard

An SQL wildcard character representing exactly one character in a LIKE pattern.

51
New cards

COUNT(*)

An aggregate function that returns the number of rows in the group or result set being counted.

52
New cards

AVG()

An aggregate function that returns the average value of a numeric expression or column.

53
New cards

MIN()

An aggregate function that returns the minimum value in the selected set.

54
New cards

MAX()

An aggregate function that returns the maximum value in the selected set.

55
New cards

SUM()

An aggregate function that returns the sum of selected numeric values.

56
New cards

UPPER()

A text scalar function that converts text to uppercase.

57
New cards

LOWER()

A text scalar function that converts text to lowercase.

58
New cards

LENGTH()

A text scalar function that returns the length of a text value.

59
New cards

TRIM()

A text scalar function that removes surrounding whitespace from a string.

60
New cards

SUBSTRING()

A text scalar function that extracts a portion of a string using a starting position and length.

61
New cards

CONCAT()

A scalar function that combines strings or columns into one string.

62
New cards

REPLACE()

A scalar function that replaces a specified substring with a replacement value.

63
New cards

NOW()

A date/time scalar function that returns the current date and time.

64
New cards

CURRENT_DATE

A date/time scalar function that returns the current date.

65
New cards

AGE(timestamp1, timestamp2)

A date/time scalar function that returns the difference between two timestamps.

66
New cards

EXTRACT(field FROM timestamp)

A date/time scalar function that extracts a specified date/time field from a timestamp.