Relational Databases Flashcards

1
Q

CONSTRAINT

A

Optional keyword followed by the constraint named and declaration

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

CHECK

A

Specifies an expression on one ore more columns of a table. Constraint is violated when the expression is FALSE and satisfied when the expression is either TRUE or NULL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

UNIQUE

A

Constraint that ensures values in a column, or group of columns, are unique

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Table Constraint

A

governs values in one or more columns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Column Constraint

A

Govern values in a single column

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Constraint

A

ruled that governs allowable values in a database. Constraints are based on relation and business rules, and implemented with special keywords in a CREATE TABLE statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

ON UPDATE/ON DELETE

A

Actions are specified in the optional ON UPDATE and ON DELETE clauses of the FOREIGN KEY constraint

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

CASCADE

A

propagates primary key changes to foreign keys

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

SET DEFAULT

A

Sets invalid foreign keys to the foreign key default value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

SET NULL

A

Sets invalid foreign keys to a NULL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

RESTRICT

A

Rejects an insert, update or delete that violates referential integrity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Referential Integrity

A

Relational Rule that requires foreign key values are either fully NULL or match some primary key value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Fully NULL

A

Foreign key is a simple or composite foreign key in which all columns are NULL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Foreign Key/References

A

Constraint is added to a CREATE TABLE statement with the FORIEGN KEY and REFERENCES keywords.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Referential integrity

A

Requires a foreign key values must either be NULL or match some value of the referenced primary key.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Foreign Keys

A

A Column or group of columns that refer to a primary key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

AUTO_INCREMENT

A

Defines an auto-increment column. Command follows the columns data type in a CREATE TABLE statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Auto-increment Colum

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

PRIMARY KEY

A

Constraint in a CREATE TABLE statement names the tables primary key.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Composite Primary Key

A

Primary key consisting of multiple columns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Simple Primary Key

A

A primary key that consist of a single Column

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Primary Key

A

A Column, or group of columns, used to identify a row

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

TRUNCATE

A

Statement that deletes all rows from a table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

FROM

A

Keyword is followed by the table now whose rows are to be deletedT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

DELETE

A

Statement that deletes existing rows in a table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

SET

A

Statements use the SET clause to specify the new column values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Update

A

Modifies existing rows in a table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Default

A

Optional keyword that follow the column name and date type in CREATE TABLE statement. Column is assigned the default value, rather than NULL, when omitted form an INSERT statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

VALUES

A

Specifies the column values to be added

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

INSERT INTO

A

names the table and columns where data is to be added. INTO keyword is optional

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

INSERT

A

Statement adds a row to a table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

Truth Tables

A

Value of logical expressions containing NULL Operands is defined in a truth table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

IS NULL/IS NOT NULL

A

Operators must be used to select NULL values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

NOT NULL

A

Constraint prevents a column from having a NULL value. Statements that insert NULL, or update a value to NULL, are automatically rejected. NOT NULL follows the column name and date type in a CREATE TABLE statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

NULL

A

Special value that represents either unknown or inapplicable data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

WHERE

A

SELECT statement has an option WHERE clause that specifies a condition for selecting rows. A row is selected when the condition is TRUE for the row values. A row is omitted when the condition is either FALSE or NULL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

Condition

A

Expression that evaluates to a logical value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

LIMIT

A

Clause that limits the number of rows returned by a SELECT statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

Result table

A

SELECT statement returns a set of rows, called the result table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

SELECT/FROM

A

Statements selects rows from a table. Statement has a SELECT clause and a FROM clause. FROM clause specifies the table from which rows are selected. SELECT clause specifies one or more expression, separated by commas, that determine what values are returned for each row.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

Precedence of Operators

A

-(unary), ^, * / % , + - (binary), = != < > <= >= , NOT, AND, OR

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

Operator Precedence

A

Operators in an expression are evaluated in the order of operator precedence. Parentheses are always evaluated first

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

Expression

A

String of operators, operands, and parentheses that evaluates to a single value. Operands may be column names or fixed values. Value of the expression may be any data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

Binary Operator

A

Has two operands

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

Unary Operator

A

Has more than one operand

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

Logical Operator

A

Computes logical values from logical operands

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

Comparison operator

A

Computes logical values TRUE or FALSE. Operands may be numeric, character, and other data types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

Arithmetic operator

A

Computes numeric values from numeric operands

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

Operator/Operands

A

Symbol that computes a value from one or more other values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

Unsigned

A

Number cannot be negative

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
51
Q

Signed

A

Number may be negative

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

Document

A

Data types contains textual data in a structured format such as XML or JSON

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
53
Q

Spatial

A

Data type that stores geometric information, such as lines, polygons, and map coordinates

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
54
Q

Binary

A

Data type that stores data exactly as the data appears in memory or computer files, bit for bit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

Date and time

A

data type that represents date, time, or both. Some date and time data types include a time zone or specify a time interval

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
56
Q

Character

A

Data type that represents textual characters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
57
Q

Decimal

A

Data type represents numbers with fractional values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
58
Q

Integer

A

Represent positive and negative integers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
59
Q

Data Type

A

named set of values from which column values are drawn

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
60
Q

ALTER TABLE

A

Statement adds, deletes, or modifies columns on an existing table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
61
Q

DROP TABLE

A

Statement that deletes a table, along with all the table’s rows, from a database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
62
Q

CREATE TABLE

A

Statement creates a new table by specifying the table name, column names, and column data types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
63
Q

Data Independence

A

Rule 4 is called Data indepenedence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
64
Q

Empty table

A

Table without rows is called an empty table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
65
Q

Cell

A

Single column of a single row

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
66
Q

Row

A

Unnamed sequence of values. Each value corresponds to a column and belongs to the columns data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
67
Q

Column

A

has a name and a data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
68
Q

Table

A

named, fixed sequence of columns, and a varying set of rows

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
69
Q

SHOW CREATE TABLE TableName

A

Shows the CREATE TABLE statement for the TableName table of the default database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
70
Q

SHOW COLUMNS FROM TableName

A

Lists all columns in the TableName table of the default database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
71
Q

SHOW TABLES

A

Lists all tables in the default database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
72
Q

SHOW DATABASES

A

Lists all databases in the database system instance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
73
Q

USE Databasename

A

Selects a default database for use in subsequent SQL statements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
74
Q

DROP DATABASE DatabaseName

A

Deletes a database, including all tables in the database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
75
Q

CREATE DATABASE DatabaseName

A

Creates a new Database with name of DatabaseName

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
76
Q

Database System Instance

A

single executing copy of a database system. Personal Computers usually run just one instance of a database system. Shared computers, such as computers used for cloud services, usually run multiple instances of a database system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
77
Q

Data Transaction Language

A

Manages database transactions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
78
Q

Data Control Langauge

A

Controls database user access

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
79
Q

Data Manipulation Language

A

manipulates data stores in a database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
80
Q

Data Query Language

A

Retrieves data from the database

81
Q

Data Definition Language

A

Defines the structure of the database

82
Q

Clause

A

Clause groups SQL keywords like SELECT, FROM, and WHERE with table names like City, Column names like Name, and conditions like Population >10000.

83
Q

Statement

A

complete commmand composed of one or more clauses

84
Q

SQL

A

High-level computer language for storing, manipulating, and retrieving data

85
Q

Constraints

A

Rules implemented as SQL constraints and enforced by the database system

86
Q

Business Rules

A

Rules based on business policy and specific to a particular database

87
Q

Relational Algebra

A

Operations collectivelly called Relational Algebra and are the theoretical foundations of the SQL Language

88
Q

Data Type

A

Named set of values, from which column values are drawn

89
Q

Row

A

Unnamed tuple of values. Each value corresponds to a column and belongs to the columns data type

90
Q

Column

A

Has a name and a data type

91
Q

Table

A

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

92
Q

Tuple

A

Ordered collection of elements enclosed in parentheses

93
Q

Set

A

Unordered collection of elements enclosed in braces

94
Q

Big Data

A

Rise of the internet lead to generating unprecedented data volumes and rapidly changing data structures

95
Q

Relational Model

A

Database model based on a tabular data structure. Data structure, operations, and rules are standardized in SQL

96
Q

Rules

A

Govern Valid Data

97
Q

Operations

A

Manipulate Data structures

98
Q

Data Structures

A

Prescribe how data is organized

99
Q

Database Model

A

Conceptual Framework for database systems

100
Q

Optional keyword followed by the constraint named and declaration

A

CONSTRAINT

101
Q

Specifies an expression on one ore more columns of a table. Constraint is violated when the expression is FALSE and satisfied when the expression is either TRUE or NULL

A

CHECK

102
Q

Constraint that ensures values in a column, or group of columns, are unique

A

UNIQUE

103
Q

governs values in one or more columns

A

Table Constraint

104
Q

Govern values in a single column

A

Column Constraint

105
Q

ruled that governs allowable values in a database. Constraints are based on relation and business rules, and implemented with special keywords in a CREATE TABLE statement.

A

Constraint

106
Q

Actions are specified in the optional ON UPDATE and ON DELETE clauses of the FOREIGN KEY constraint

A

ON UPDATE/ON DELETE

107
Q

propagates primary key changes to foreign keys

A

CASCADE

108
Q

Sets invalid foreign keys to the foreign key default value

A

SET DEFAULT

109
Q

Sets invalid foreign keys to a NULL

A

SET NULL

110
Q

Rejects an insert, update or delete that violates referential integrity

A

RESTRICT

111
Q

Relational Rule that requires foreign key values are either fully NULL or match some primary key value

A

Referential Integrity

112
Q

Foreign key is a simple or composite foreign key in which all columns are NULL

A

Fully NULL

113
Q

Constraint is added to a CREATE TABLE statement with the FORIEGN KEY and REFERENCES keywords.

A

Foreign Key/References

114
Q

Requires a foreign key values must either be NULL or match some value of the referenced primary key.

A

Referential integrity

115
Q

A Column or group of columns that refer to a primary key

A

Foreign Keys

116
Q

Defines an auto-increment column. Command follows the columns data type in a CREATE TABLE statement

A

AUTO_INCREMENT

117
Q

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

A

Auto-increment Colum

118
Q

Constraint in a CREATE TABLE statement names the tables primary key.

A

PRIMARY KEY

119
Q

Primary key consisting of multiple columns

A

Composite Primary Key

120
Q

A primary key that consist of a single Column

A

Simple Primary Key

121
Q

A Column, or group of columns, used to identify a row

A

Primary Key

122
Q

Statement that deletes all rows from a table

A

TRUNCATE

123
Q

Keyword is followed by the table now whose rows are to be deletedT

A

FROM

124
Q

Statement that deletes existing rows in a table

A

DELETE

125
Q

Statements use the SET clause to specify the new column values

A

SET

126
Q

Modifies existing rows in a table

A

Update

127
Q

Optional keyword that follow the column name and date type in CREATE TABLE statement. Column is assigned the default value, rather than NULL, when omitted form an INSERT statement

A

Default

128
Q

Specifies the column values to be added

A

VALUES

129
Q

names the table and columns where data is to be added. INTO keyword is optional

A

INSERT INTO

130
Q

Statement adds a row to a table

A

INSERT

131
Q

Value of logical expressions containing NULL Operands is defined in a truth table

A

Truth Tables

132
Q

Operators must be used to select NULL values.

A

IS NULL/IS NOT NULL

133
Q

Constraint prevents a column from having a NULL value. Statements that insert NULL, or update a value to NULL, are automatically rejected. NOT NULL follows the column name and date type in a CREATE TABLE statement.

A

NOT NULL

134
Q

Special value that represents either unknown or inapplicable data

A

NULL

135
Q

SELECT statement has an option WHERE clause that specifies a condition for selecting rows. A row is selected when the condition is TRUE for the row values. A row is omitted when the condition is either FALSE or NULL

A

WHERE

136
Q

Expression that evaluates to a logical value

A

Condition

137
Q

Clause that limits the number of rows returned by a SELECT statement.

A

LIMIT

138
Q

SELECT statement returns a set of rows, called the result table

A

Result table

139
Q

Statements selects rows from a table. Statement has a SELECT clause and a FROM clause. FROM clause specifies the table from which rows are selected. SELECT clause specifies one or more expression, separated by commas, that determine what values are returned for each row.

A

SELECT/FROM

140
Q

-(unary), ^, * / % , + - (binary), = != < > <= >= , NOT, AND, OR

A

Precedence of Operators

141
Q

Operators in an expression are evaluated in the order of operator precedence. Parentheses are always evaluated first

A

Operator Precedence

142
Q

String of operators, operands, and parentheses that evaluates to a single value. Operands may be column names or fixed values. Value of the expression may be any data type

A

Expression

143
Q

Has two operands

A

Binary Operator

144
Q

Has more than one operand

A

Unary Operator

145
Q

Computes logical values from logical operands

A

Logical Operator

146
Q

Computes logical values TRUE or FALSE. Operands may be numeric, character, and other data types

A

Comparison operator

147
Q

Computes numeric values from numeric operands

A

Arithmetic operator

148
Q

Symbol that computes a value from one or more other values

A

Operator/Operands

149
Q

Number cannot be negative

A

Unsigned

150
Q

Number may be negative

A

Signed

151
Q

Data types contains textual data in a structured format such as XML or JSON

A

Document

152
Q

Data type that stores geometric information, such as lines, polygons, and map coordinates

A

Spatial

153
Q

Data type that stores data exactly as the data appears in memory or computer files, bit for bit

A

Binary

154
Q

data type that represents date, time, or both. Some date and time data types include a time zone or specify a time interval

A

Date and time

155
Q

Data type that represents textual characters

A

Character

156
Q

Data type represents numbers with fractional values

A

Decimal

157
Q

Represent positive and negative integers

A

Integer

158
Q

named set of values from which column values are drawn

A

Data Type

159
Q

Statement adds, deletes, or modifies columns on an existing table

A

ALTER TABLE

160
Q

Statement that deletes a table, along with all the table’s rows, from a database

A

DROP TABLE

161
Q

Statement creates a new table by specifying the table name, column names, and column data types

A

CREATE TABLE

162
Q

Rule 4 is called Data indepenedence

A

Data Independence

163
Q

Table without rows is called an empty table

A

Empty table

164
Q

Single column of a single row

A

Cell

165
Q

Unnamed sequence of values. Each value corresponds to a column and belongs to the columns data type

A

Row

166
Q

has a name and a data type

A

Column

167
Q

named, fixed sequence of columns, and a varying set of rows

A

Table

168
Q

Shows the CREATE TABLE statement for the TableName table of the default database

A

SHOW CREATE TABLE TableName

169
Q

Lists all columns in the TableName table of the default database

A

SHOW COLUMNS FROM TableName

170
Q

Lists all tables in the default database

A

SHOW TABLES

171
Q

Lists all databases in the database system instance

A

SHOW DATABASES

172
Q

Selects a default database for use in subsequent SQL statements

A

USE Databasename

173
Q

Deletes a database, including all tables in the database

A

DROP DATABASE DatabaseName

174
Q

Creates a new Database with name of DatabaseName

A

CREATE DATABASE DatabaseName

175
Q

single executing copy of a database system. Personal Computers usually run just one instance of a database system. Shared computers, such as computers used for cloud services, usually run multiple instances of a database system.

A

Database System Instance

176
Q

Manages database transactions

A

Data Transaction Language

177
Q

Controls database user access

A

Data Control Langauge

178
Q

manipulates data stores in a database

A

Data Manipulation Language

179
Q

Retrieves data from the database

A

Data Query Language

180
Q

Defines the structure of the database

A

Data Definition Language

181
Q

Clause groups SQL keywords like SELECT, FROM, and WHERE with table names like City, Column names like Name, and conditions like Population >10000.

A

Clause

182
Q

complete commmand composed of one or more clauses

A

Statement

183
Q

High-level computer language for storing, manipulating, and retrieving data

A

SQL

184
Q

Rules implemented as SQL constraints and enforced by the database system

A

Constraints

185
Q

Rules based on business policy and specific to a particular database

A

Business Rules

186
Q

Operations collectivelly called Relational Algebra and are the theoretical foundations of the SQL Language

A

Relational Algebra

187
Q

Named set of values, from which column values are drawn

A

Data Type

188
Q

Unnamed tuple of values. Each value corresponds to a column and belongs to the columns data type

A

Row

189
Q

Has a name and a data type

A

Column

190
Q

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

A

Table

191
Q

Ordered collection of elements enclosed in parentheses

A

Tuple

192
Q

Unordered collection of elements enclosed in braces

A

Set

193
Q

Rise of the internet lead to generating unprecedented data volumes and rapidly changing data structures

A

Big Data

194
Q

Database model based on a tabular data structure. Data structure, operations, and rules are standardized in SQL

A

Relational Model

195
Q

Govern Valid Data

A

Rules

196
Q

Manipulate Data structures

A

Operations

197
Q

Prescribe how data is organized

A

Data Structures

198
Q

Conceptual Framework for database systems

A

Database Model