SQL Overview: DML, Data Types, and Integrity Constraints

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

1/99

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

100 Terms

1
New cards

Relational Algebra

Procedure-based data manipulation language.

2
New cards

Relational Calculus

Non-procedural data manipulation language using logic.

3
New cards

SQL

Structured Query Language for database manipulation.

4
New cards

4GLs

Fourth-generation languages for user-friendly applications.

5
New cards

5GLs

Fifth-generation languages using natural language.

6
New cards

DDL

Data Definition Language for database schema.

7
New cards

DML

Data Manipulation Language for data operations.

8
New cards

ISO Standard

International standard for SQL compliance.

9
New cards

SEQUEL

Original name for SQL, developed in 1974.

10
New cards

Integrity Enhancement Feature

Enhancements for data integrity in SQL.

11
New cards

Integrity Constraints

Rules ensuring data validity in databases.

12
New cards

Primary Key

Unique identifier for table rows.

13
New cards

Foreign Key

Column linking child table to parent table.

14
New cards

Referential Integrity

Ensures foreign key values match primary keys.

15
New cards

Domain Constraints

Rules defining valid values for a column.

16
New cards

CHECK Constraint

Ensures values meet specific conditions.

17
New cards

CREATE DOMAIN

Defines a custom data type in SQL.

18
New cards

DROP DOMAIN

Removes a previously defined domain.

19
New cards

Tuple Relational Calculus

Uses tuples to express queries in logic.

20
New cards

Domain Relational Calculus

Uses domain variables to express queries.

21
New cards

SQL3

SQL version supporting object-oriented features.

22
New cards

SELECT Statement

Retrieves data from a database.

23
New cards

INSERT Statement

Adds new records to a database.

24
New cards

UPDATE Statement

Modifies existing records in a database.

25
New cards

DELETE Statement

Removes records from a database.

26
New cards

Views

Virtual tables based on SQL queries.

27
New cards

View Updatability

Ability to modify data through views.

28
New cards

ISO Transaction Model

Defines ACID properties for transactions.

29
New cards

Literals

Constants used in SQL statements.

30
New cards

Reserved Words

Fixed keywords in SQL syntax.

31
New cards

FOREIGN KEY

Establishes a relationship between two tables.

32
New cards

ON DELETE SET NULL

Sets foreign key to NULL on deletion.

33
New cards

CREATE ASSERTION

Defines a condition that must hold true.

34
New cards

SQL DDL

Defines database schema and objects.

35
New cards

CREATE SCHEMA

Creates a new database schema.

36
New cards

DROP SCHEMA

Deletes a schema and its objects.

37
New cards

RESTRICT

Prevents deletion if schema is not empty.

38
New cards

CASCADE

Deletes all associated objects automatically.

39
New cards

CREATE TABLE

Defines a new table structure.

40
New cards

PRIMARY KEY

Uniquely identifies each row in a table.

41
New cards

UNIQUE Constraint

Ensures all values in a column are distinct.

42
New cards

ALTER TABLE

Modifies an existing table structure.

43
New cards

DROP TABLE

Removes a table and its data.

44
New cards

INSERT INTO

Adds new rows to a table.

45
New cards

INSERT ... SELECT

Copies rows from one table to another.

46
New cards

UPDATE

Modifies existing records in a table.

47
New cards

DELETE

Removes rows from a table.

48
New cards

DISTINCT

Eliminates duplicate rows in query results.

49
New cards

GROUP BY

Groups rows sharing a common value.

50
New cards

HAVING Clause

Filters groups based on a condition.

51
New cards

ORDER BY

Sorts query results by specified columns.

52
New cards

DEFAULT

Specifies a default value for a column.

53
New cards

CONSTRAINT

Limits the type of data in a column.

54
New cards

VARCHAR

Variable-length character string data type.

55
New cards

DECIMAL

Fixed-point number data type for precision.

56
New cards

SMALLINT

Integer data type with small storage size.

57
New cards

Date Format

Specifies date representation in SQL.

58
New cards

SELECT

Command to retrieve data from a database.

59
New cards

FROM

Specifies the table to select data from.

60
New cards

AS

Renames a column in the result set.

61
New cards

WHERE

Filters records based on specified conditions.

62
New cards

BETWEEN

Tests if a value falls within a range.

63
New cards

IN

Checks if a value matches any in a list.

64
New cards

LIKE

Pattern matching operator for string comparisons.

65
New cards

IS NULL

Tests for null values in a column.

66
New cards

COUNT

Returns the number of items in a column.

67
New cards

SUM

Calculates the total of a numeric column.

68
New cards

AVG

Calculates the average of a numeric column.

69
New cards

MIN

Finds the smallest value in a column.

70
New cards

MAX

Finds the largest value in a column.

71
New cards

HAVING

Filters groups based on aggregate conditions.

72
New cards

Subquery

A SELECT statement nested within another query.

73
New cards

Calculated Fields

Columns derived from expressions in SELECT.

74
New cards

Compound Condition

Combines multiple conditions using AND/OR.

75
New cards

NULL Search Condition

Condition to find records with null values.

76
New cards

Pattern Matching Symbols

Special characters for LIKE queries: % and _.

77
New cards

Aggregate Functions

Functions that perform calculations on multiple rows.

78
New cards

Single Column Ordering

Sorts results by one specified column.

79
New cards

Multiple Column Ordering

Sorts results by multiple specified columns.

80
New cards

Negated Version

Opposite condition using NOT in SQL queries.

81
New cards

Viewing

Table containing records of property viewings.

82
New cards

Branch

Table representing different office locations.

83
New cards

Aggregate Function

Calculates a single result from multiple rows.

84
New cards

AVG()

Returns the average value of a numeric column.

85
New cards

SalDiff

Difference between salary and average salary.

86
New cards

WHERE Clause

Filters records based on specified conditions.

87
New cards

ORDER BY Clause

Sorts the result set by specified columns.

88
New cards

Single Column Subquery

Subquery returning only one column of data.

89
New cards

EXISTS

Checks for existence of rows in subquery.

90
New cards

ANY

Condition true if satisfied by any subquery value.

91
New cards

ALL

Condition true only if satisfied by all values.

92
New cards

IN Operator

Checks if a value exists in a set.

93
New cards

JOIN

Combines rows from two or more tables.

<p>Combines rows from two or more tables.</p>
94
New cards

Equi-Join

Join based on equality condition between columns.

95
New cards

LEFT OUTER JOIN

Includes unmatched rows from the left table.

96
New cards

RIGHT OUTER JOIN

Includes unmatched rows from the right table.

97
New cards

FULL OUTER JOIN

Includes unmatched rows from both tables.

98
New cards

CROSS JOIN

Produces Cartesian product of two tables.

99
New cards

GROUP BY Clause

Groups rows sharing a property for aggregation.

100
New cards

COUNT()

Returns the number of rows that match a query.