Data Management Foundations

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

1/148

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.

149 Terms

1
New cards

Database Application

Software that helps business users interact with database systems.

2
New cards

Database Roles

Database administrator, authorization, rules, query processor, query optimization, storage manager, transaction manager

3
New cards

Database Administrator

Responsible for securing the database system against unauthorized users; enforces procedures for user access & database system availability

4
New cards

Authorization

Authorize individual users to access specific data (tables, columns, or rows of a database)

5
New cards

Query Processor

Interprets queries, creates a plan to modify the database or retrieve data, and returns query results to the application

6
New cards

Query Optimization

Ensures the most efficient instructions are executed on the data

7
New cards

Storage Manager

Translates the query processor instructions into low-level file-system commands that modify or retrieve data

8
New cards

Indexes

Used by the storage manager to quickly locate data

9
New cards

Transaction Manager

Ensures transactions are properly executed, prevents conflicts between concurrent transactions, and restores the database to a consistent state in the event of a transaction or system failure

10
New cards

INSERT

Inserts rows into a table

11
New cards

SELECT

Retrieves data from a table

12
New cards

UPDATE

Modifies data in a table

13
New cards

DELETE

Deletes rows from a table

14
New cards

CREATE TABLE

Creates a new table by specifying the table and column names

15
New cards

Data Type

Indicates the format of column values; can be numeric, textual, or complex

16
New cards

INT

Stores integer values

17
New cards

DECIMAL

Stores fractional numeric values

18
New cards

VARCHAR

Stores textual values

19
New cards

DATE

Stores year, month, and day

20
New cards

Analysis Phase

Specifies database requirements without regard to a specific database system. Requirements are represented as entities, relationships, and attributes.

21
New cards

Logical Design Phase

Implements database requirements in a specific database system. For relational database systems, converts entities, relationships, and attributes into tables, keys, and columns.

22
New cards

Physical Design Phase

Adds indexes and specifies how tables are organized on storage media. Affects query processing speed but never affects the query result.

23
New cards

Data Independence

The principle that physical design never affects query results

24
New cards

Application Programming Interface (API)

Typically used by database programs to simplify the use of SQL with a general-purpose language

25
New cards

MySQL Command-Line Client

A text interface included in the MySQL Server download. Returns an error code and description when an SQL statement is syntactically incorrect or the database cannot execute the statement.

26
New cards

Tuple

An ordered collection of elements enclosed in parentheses

27
New cards

Table

Has a name, a fixed tuple of columns, and a varying set of rows

28
New cards

Column

Has a name and a data type

29
New cards

Row

An unnamed tuple of values. Each value corresponds to a column and belongs to the column's data type.

30
New cards

Business Rules

Based on business policy and specific to a particular database

31
New cards

Literals

Explicit values that are string, numeric, or binary. Strings must be surrounded by single quotes or double quotes. Binary values are represented with x'0' where the 0 is any hex value.

32
New cards

Keywords

Words with special meaning.

ex. SELECT, FROM, WHERE

33
New cards

Identifiers

Objects from the database like tables, columns, etc.

34
New cards

Comments

Statement intended only for humans and ignored by the database when parsing an SQL statement

35
New cards

Data Definition Language (DDL)

Defines the structure of the database

36
New cards

Data Query Language (DQL)

Retrieves data from a database

37
New cards

Data Manipulation Language (DML)

Manipulates data stored in a database

38
New cards

Data Control Language (DCL)

Controls database user access

39
New cards

Data Transaction Language (DTL)

Manages database transactions

40
New cards

Data Independence

Allows database administrators to improve query performance by changing the organization of data on storage devices, without affecting query results

41
New cards

DROP TABLE

Deletes a table, along with all the table's rows, from a database

42
New cards

ALTER TABLE

Adds, deletes, or modifies columns on an existing table

43
New cards

Integer Data Types

Represent positive and negative integers, varying by the number of bytes allocated for each value.

44
New cards

TINYINT

1 byte; Signed range: -128 to 127; Unsigned range: 0 to 255

45
New cards

SMALLINT

2 bytes; Signed range: -32,768 to 32,767; Unsigned range: 0 to 65,535

46
New cards

INTEGER or INT

4 bytes; Signed range: -2,147,483,648 to 2,147,483,647; Unsigned range: 0 to 4,294,967,295

47
New cards

MEDIUMINT

3 bytes; Signed range: -8,388,608 to 8,388,607; Unsigned range: 0 to 16,777,215

48
New cards

BIGINT

8 bytes; Signed range: -263 to 263 -1; Unsigned range: 0 to 264 -1

49
New cards

% (modulo)

Divides one numeric value by another and returns the integer remainder

50
New cards

^ (Exponentiation)

Raises one numeric value to the power of another

51
New cards

= (Equality)

Compares two values for equality

52
New cards

!= (Inequality)

Compares two values for inequality

53
New cards

UPDATE Statement

Uses the SET clause to specify the new column values. An optional WHERE clause specifies which rows are updated. Omitting the WHERE clause results in all rows being updated.

54
New cards

DELETE Statement

Deletes existing rows in a table. The FROM keyword is followed by the table name whose rows are to be deleted. An optional WHERE clause specifies which rows should be deleted. Omitting the WHERE clause results in all rows in the table being deleted.

55
New cards

TRUNCATE statement

Deletes all rows from a table, similar to DELETE but with minor differences depending on the database system.

56
New cards

MERGE statement

Selects data from one table, called the source, and inserts the data to another table, called the target

57
New cards

Primary Key

A column, or group of columns, used to identify a row, usually the table's first column

58
New cards

Simple Primary Key

A primary key that consists of a single column

59
New cards

Composite Primary Key

The primary key formed by combining two or more columns in a table

60
New cards

Auto-Increment Column

A numeric column that is assigned an automatically incrementing value when a new row is inserted

61
New cards

Primary Key Errors

Inserting values for auto-increment primary keys, omitting values for primary keys that are not auto-increment columns

62
New cards

Foreign Key

A column, or group of columns, that refer to a primary key

63
New cards

Foreign Key Constraint

When specified, the database rejects insert, update, and delete statements that violate referential integrity

64
New cards

RESTRICT

Rejects an insert, update, or delete that violates referential integrity

65
New cards

CASCADE

Propagates primary key changes to foreign keys

66
New cards

Constraint

A rule that governs allowable values in a database, based on relational and business rules

67
New cards

Adding & Dropping Constraints

Constraints are added and dropped with the ALTER TABLE TableName followed by an ADD, DROP, or CHANGE clause

68
New cards

BETWEEN operator

Provides an alternative way to determine if a value is between two other values

69
New cards

LIKE operator

When used in a WHERE clause, matches text against a pattern using the two wildcard characters % and _

70
New cards

ORDER BY clause

Orders selected rows by one or more columns in ascending (alphabetic or increasing) order. The DESC keyword with the ORDER BY clause orders rows in descending order.

71
New cards

ABS function

Returns the absolute value of a number

72
New cards

LOWER(s) Function

Returns the lowercase "s". Or any specified characters.

73
New cards

TRIM Function

Removes leading and trailing spaces in a text string, but spaces between words are not removed

74
New cards

HOUR(t), MINUTE(t), SECOND(t) Function

Returns the hour, minute, or second from time t

75
New cards

Aggregate Function

Processes values from a set of rows and returns a summary value

76
New cards

COUNT function

Counts the number of rows in the set

77
New cards

MIN function

Finds the minimum value in the set

78
New cards

MAX function

Finds the maximum value in the set

79
New cards

SUM Function

Sums all the values in the set

80
New cards

AVG Function

Computes the arithmetic mean of all the values in the set

81
New cards

HAVING clause

Used with the GROUP BY clause to filter group results

82
New cards

Join

A SELECT statement that combines data from two tables, known as the left table and right table, into a single result. The tables are combined by comparing columns from the left and right tables, usually with the = operator. The columns must have comparable data types.

83
New cards

Alias

Used to replace a column name. Follows the column name, separated by an optional AS keyword.

84
New cards

JOIN clause

Determines how a join query handles unmatched rows

85
New cards

INNER JOIN

Selects only matching left and right table rows

86
New cards

FULL JOIN

Selects all left and right table rows, regardless of match

87
New cards

LEFT JOIN

Selects all left table rows, but only matching right table rows

88
New cards

RIGHT JOIN

Selects all right table rows, but only matching left table rows

89
New cards

Outer Join

Any join that selects unmatched rows, including left, right, and full joins

90
New cards

UNION keyword

Combines the two results into one table

91
New cards

Equijoin

Compares columns of two tables with the = operator

92
New cards

Non-Equijoin

Compares columns with an operator other than =, such as <, >

93
New cards

Self Join

Joins a table to itself

94
New cards

CROSS JOIN

Combines two tables without comparing columns. Uses CROSS JOIN clause without an ON clause.

95
New cards

Subquery

A query nested within another SQL query. Sometimes called a nested query or inner query.

96
New cards

Materialized View

A view for which data is stored at all times. Whenever a base table changes, the corresponding view tables can also change, so materialized views must be refreshed.

97
New cards

WITH CHECK OPTION

The database rejects inserts and updates that do not satisfy the view query WHERE clause

98
New cards

Entity-Relationship Model

A high-level representation of data requirements, ignoring implementation details

99
New cards

Reflexive Relationship

A relationship that relates an entity to itself

100
New cards

Entity Relationship Diagram

A schematic picture of entities, relationships, and attributes. Entities are drawn as rectangles. Commonly called an ER diagram.