Database Fundamentals & SQL Vocabulary

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

1/66

flashcard set

Earn XP

Description and Tags

A concise vocabulary set covering the core terms, commands, concepts and data types introduced in the SQL & database lecture notes.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

67 Terms

1
New cards

Database Management System (DBMS)

Software layer that stores, organizes and controls all read/write access to one or more databases.

2
New cards

Frontend

Client-side program (e.g., HeidiSQL, phpMyAdmin) used to send SQL statements to a DBMS and display results.

3
New cards

Database (DB)

Collection of structured data managed by a DBMS; often used synonymously with Database System (DBS).

4
New cards

Relational Database

Database whose logical structure is a set of related tables (relations) connected through keys.

5
New cards

Table (Relation)

Two-dimensional structure of rows and columns that stores data of the same entity type.

6
New cards

Column / Attribute

Named field in a table describing one property of an entity; has a fixed data type.

7
New cards

Row / Record / Tuple

Complete set of column values that represents one occurrence of an entity.

8
New cards

Primary Key

Column (or column set) whose values are unique and identify each row unambiguously.

9
New cards

Foreign Key

Column that stores values of a primary key from another table to create a relationship.

10
New cards

Composite Key

Primary key composed of two or more columns (e.g., artikelNr + liefNr in a junction table).

11
New cards

CREATE DATABASE

DDL statement that creates a new database schema; optional CHARACTER SET and COLLATE define encoding and sorting.

12
New cards

CREATE TABLE

DDL statement that creates a new table definition with column list, data types and optional constraints.

13
New cards

ALTER TABLE

DDL statement used to add, change, or drop columns, indexes or constraints in an existing table.

14
New cards

INSERT INTO

DML command that adds one or many new rows to a table.

15
New cards

UPDATE

DML command that modifies existing rows in one or more columns.

16
New cards

DELETE FROM

DML command that removes one or more rows from a table.

17
New cards

SELECT

DML command that queries data; basis for data retrieval in SQL.

18
New cards

Projection

Filtering of columns in a SELECT statement (SELECT col1, col2 …).

19
New cards

Selection

Filtering of rows in a SELECT statement using WHERE criteria.

20
New cards

ORDER BY

Clause that sorts query results ascending (ASC, default) or descending (DESC).

21
New cards

LIMIT

Clause that restricts the number of returned rows; optional OFFSET skips a given number first.

22
New cards

JOIN

Operation that combines rows from two or more tables based on related columns.

23
New cards

INNER JOIN (Equi-JOIN)

Returns rows where join condition matches in both tables; non-matching rows are discarded.

24
New cards

GROUP BY

Clause that groups rows sharing the same values so that aggregate functions can be applied.

25
New cards

HAVING

Clause that filters groups produced by GROUP BY according to aggregate conditions.

26
New cards

COUNT()

Aggregate function that returns the number of non-NULL rows in a group.

27
New cards

SUM()

Aggregate function that returns the total of numeric column values.

28
New cards

AVG()

Aggregate function that returns the average of numeric column values.

29
New cards

MAX()

Aggregate function that returns the largest value in a group.

30
New cards

MIN()

Aggregate function that returns the smallest value in a group.

31
New cards

ENUM

String-based column type that restricts values to a predefined list (one choice).

32
New cards

SET

String-based column type that allows any combination of predefined values (multiple choice).

33
New cards

AUTO_INCREMENT

Column attribute that automatically increases numeric primary key when a new row is inserted.

34
New cards

InnoDB

Default MySQL storage engine that supports transactions, row-level locking and foreign keys.

35
New cards

UTF8 Character Set

Unicode encoding often chosen for databases to store international characters consistently.

36
New cards

Collation

Rule set that determines how strings are compared and sorted; e.g., utf8generalci (case-insensitive).

37
New cards

Trigger

Stored program that executes automatically BEFORE or AFTER INSERT, UPDATE or DELETE on a table.

38
New cards

Stored Procedure

Named block of SQL statements stored in the DBMS; can accept parameters; executed via CALL.

39
New cards

Stored Function

Stored routine that returns a value and can be used in SQL expressions like regular functions.

40
New cards

First Normal Form (1NF)

Eliminates repeating groups by ensuring each column holds atomic, single values.

41
New cards

Second Normal Form (2NF)

Removes partial dependencies; every non-key column depends on the whole composite key.

42
New cards

Third Normal Form (3NF)

Eliminates transitive dependencies; non-key columns depend only on the primary key.

43
New cards

Referential Integrity

Rule that a foreign-key value must have a matching primary-key value in the referenced table.

44
New cards

ON UPDATE CASCADE

Foreign-key option that automatically propagates primary-key changes to child rows.

45
New cards

ON DELETE CASCADE

Foreign-key option that automatically deletes child rows when the parent row is removed.

46
New cards

1:1 Relationship

Each row in table A relates to exactly one row in table B and vice versa via unique foreign key.

47
New cards

1:n Relationship

One row in table A can relate to many rows in table B; implemented with non-unique foreign key.

48
New cards

n:m Relationship

Many-to-many link between two tables; implemented using a separate junction table with two foreign keys.

49
New cards

Junction (Connection) Table

Table that breaks an n:m relationship into two 1:n relationships; typically has a composite primary key.

50
New cards

HeidiSQL

Windows GUI frontend for MySQL/MariaDB used in the course for database creation and queries.

51
New cards

phpMyAdmin

Web-based MySQL frontend bundled with XAMPP; alternative to HeidiSQL.

52
New cards

XAMPP

Local web-server package containing Apache, MySQL/MariaDB, PHP and Perl for testing purposes.

53
New cards

INT

Numeric data type for whole numbers (-2,147,483,648 to 2,147,483,647).

54
New cards

DECIMAL(M,D)

Fixed-point numeric data type; M total digits, D digits after decimal point; precise for money.

55
New cards

CHAR(n)

Fixed-length character data type that always stores exactly n characters (padded with spaces).

56
New cards

VARCHAR(n)

Variable-length character data type that stores up to n characters without padding.

57
New cards

DATE

Data type that stores calendar dates in 'YYYY-MM-DD' format.

58
New cards

DATETIME

Data type that stores date and time in 'YYYY-MM-DD hh:mm:ss' format.

59
New cards

TINYINT

1-byte integer often used to mimic Boolean (0/1) values in MySQL.

60
New cards

DDL (Data Definition Language)

SQL subset that creates or alters structures: CREATE, ALTER, DROP, RENAME.

61
New cards

DML (Data Manipulation Language)

SQL subset that works with data: SELECT, INSERT, UPDATE, DELETE.

62
New cards

DCL (Data Control Language)

SQL subset for rights management: GRANT, REVOKE.

63
New cards

COMMIT

Transaction command that makes all changes since last COMMIT/ROLLBACK permanent.

64
New cards

ROLLBACK

Transaction command that undoes all changes since last COMMIT.

65
New cards

GRANT

DCL command that supplies privileges to a user or role.

66
New cards

REVOKE

DCL command that removes previously granted privileges from a user or role.

67
New cards

User Account (MySQL)

Identified by 'user'@'host'; authentication credentials plus specific privilege set.