Word Document Study Guide Flashcards

1
Q

Database application

A

Software that helps users interact with database systems

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

Database administrator

A

Responsible for securing the database system against unauthorized users.
Enforces procedures for user access and availability.

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

Authorization

A

Database users should have limited access to specific tables, columns, or rows of database.

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

Rules

A

Database systems ensure data is consistent with structural and business rules.

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

Query Processor

A

Interprets queries, creates a plan to modify the database or retrieve data, and return query results to the application.
Performs query optimization to ensure the most efficient instructions are executed in the data.

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

Store Manager (storage engine)

A

Translates the query processor instructions into low-level file-system commands that modify or retrieve data.
Uses indexes to quickly locate data.

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

Transaction Manager

A

Ensures transactions are properly executed.
Prevents conflict between concurrent transactions.
Restores database to a consistent state in the event of a transaction failure.

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

Leading database products

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

INSERT

A

Inserts rows into a table

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

SELECT

A

Retrieves data from a table

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

UPDATE

A

Modifies data in a table

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

DELETE

A

delete rows from a table

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

CREATE TABLE

A

Creates a new table by specifying the table and column names.

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

Data Types (INT, DECIMAL, VARCHAR, DATE)

A

Indicates the format of column values

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

INT

A

Stores integer values

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

DECIMAL

A

Stores fractional numeric values

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

VARCHAR

A

Stores textual values

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

DATE

A

stores year, month, and day

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

Analysis (1st step)

A

Specifies database requirements without regard to a specific database system.
Requirements are represented as entities, relationships, and attributes
Alternative names: Conceptual Design, entity-relationship modeling, requirements definition

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

Logical Design (2nd step)

A

Implements database requirements in a specific database system.
Converts entities, relationships, and attributes into tables, key, and columns.

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

Physical Design (3rd step)

A

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

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

Data Independence

A

Principle that physical design never affects query results.

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

Entity

A

Person, place, activity, or thing

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

Relationship

A

Link between two entities

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

Attribute

A

Descriptive property of an entity

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

Application Programming Interface (API)

A

General-purpose language to simplify the use of SQL

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

MySQL Command-Line Client

A

Text interface included in the MySQL Server download

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

Error code

A

What MySQL Server returns when an SQL statement is syntactically incorrect or database cannot execute the statement

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

Tuple

A

Ordered collection of elements enclosed in parentheses. (a,b,c) and (c,b,a)

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

Table

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
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
32
Q

Row

A

Unnamed tuple of values

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

Synonyms:
Table

A

File
Relation

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

Synonyms:
Row

A

Record
Tuple

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

Synonyms:
Column

A

Field
Attribute

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

Business rules

A

Based on business policy and specific to a particular database

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

Literals

A

Explicit values that are string, numeric, or binary.

‘String’
“String”
123
x’0fa2’

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

Keywords

A

Words with special meaning

SELECT, FROM, WHERE

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

Identifiers

A

Objects from the database like tables, columns, etc.

City, Name, Population

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

Data Definition Language (DDL)

A

Defines the structure of the database
CREATE, ALTER, DROP

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

Data Query Language (DQL)

A

Retrieves data from the database
SELECT

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

Data Manipulation Language (DML)

A

Manipulates data stored in a database
INSERT, UPDATE, DELETE

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

Data Control Language (DCL)

A

Controls database user access
GRANT, REVOKE

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

Data Transaction Language (DTL)

A

Manages database transactions
SAVEPOINT, ROLLBACK, COMMIT

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

Cell

A

Single column of a single row

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

Rule 7

A

Called data independence

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

ALTER TABLE

A

Statement that adds, delete, modifies columns on an existing table.

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

Integer by byte (Integer Storage)

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

Operator

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

Operator Precedence

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

UPDATE statement

A

uses SET clause to specify the new column values.

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

DELETE statement

A

Deletes existing rows in a table.
FROM keyword is followed by the table name whose rows are to be deleted.

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

TRUNCATE

A

Deletes all rows from a table.

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

MERGE

A

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

55
Q

Primary Key

A

Column, or group of columns, used to identify a row.
Usually the table’s first column.

56
Q

Simple primary key

A

Consists of a single column

57
Q

Composite primary key

A

Consist of multiple columns

58
Q

Auto-increment column

A

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

59
Q

Errors when inserting Primary Key

A

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

60
Q

Overriding auto-increment for a _______ is usually a mistake

A

primary key

61
Q

Foreign Key

A

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

62
Q

When a _______ constraint is specified, the database rejects insert, update, and delete statements that violate _________

A

Foreign key
Referential Integrity

63
Q

RESTRICT

A

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

64
Q

CASCADE

A

Propagates primary key changes to foreign keys

65
Q

Constraint

A

Rule that governs allowable values in a database
Based on relational and business rules

66
Q

Constraints are added and dropped with the ________ TableName followed by an ADD, DROP, or ______ clause

A

ALTER TABLE
CHANGE

67
Q

BETWEEN

A

Provides an alternative way to determine if a value is between two other values
BETWEEN minValue and maxValue

68
Q

LIKE operator, when used in a ______ clause, matches text against a pattern using the two wildcard characters “%”and “_“(underscore)

69
Q

%

A

Matches any number of characters
Ex: ‘L%t’ matches ‘Lot’, ‘Lift’

70
Q

ORDER BY

A

Orders selected rows in ascending order
DESC keyword used with ORDER BY orders rows in descending order

71
Q

ABS(n)

A

Returns absolute value of n
SELECT ABS (-5)
returns 5

72
Q

LOWER(s)

A

Returns lowercase s

73
Q

TRIM(s)

A

Removes leading and trailing white spaces

74
Q

HOUR(t)
MINUTE(t)
SECOND(t)

A

Returns the hour, minute, or second from time t

75
Q

COUNT()

A

Count the numbers of rows in the set

76
Q

MIN()

A

Finds the minimum value in the set

77
Q

MAX()

A

Finds the maximum value in the set

78
Q

SUM()

A

Sums all the values in the set

79
Q

AVG()

A

Computes the arithmetic mean of all the values in the set

80
Q

HAVING

A

Used with GROUP BY clause to filter group results

81
Q

A ____ is a SELECT statement that combines data from two tables, knowns as _____ and _____, into a single result.

A

join
left table
right table

82
Q

The tables are combined by comparing columns from the left and right tables, usually with the ____ operator

83
Q

AS

A

Replacing with an alias

84
Q

INNER JOIN

A

Selects only matching left and right table rows

85
Q

FULL JOIN

A

Selects all left and right table rows, regardless of match

86
Q

LEFT JOIN

A

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

87
Q

RIGHT JOIN

A

Selects all right tables, but only matching left table rows

88
Q

outer join

A

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

89
Q

UNION

A

Combines the two results into one table

90
Q

equijoin

A

Compares columns of two tables with the = operator

91
Q

non-equijoin

A

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

92
Q

self-join

A

Joins a table to itself

93
Q

cross-join

A

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

94
Q

Subquery

A

Query within another query
Called a nested query or inner query

95
Q

Materialized View is a view for which data is _______. Whenever a base table changes, the corresponding view tables can also _____, so materialized views must be refreshed.

A

stored at all times
change

96
Q

When WITH CHECK OPTION is specified …

A

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

97
Q

entity-relationship model

A

High-level representation of data requirements, ignoring implementation details.

98
Q

Reflexive relationship

A

Relates an entity to itself

99
Q

entity-relationship diagram

A

ER diagram
Schematic picture of entities, relationships, and attributes

100
Q

Entity Type

Type is a set

A

Set of things

101
Q

Relationship Type

Type is a set

A

Set of related things

102
Q

Attribute Type

Type is a set

A

Set of values

103
Q

Entity Instance

A

Individual thing

104
Q

Relationship Instance

A

Statement about entity instances

105
Q

Attribute Instance

A

Individual value

106
Q

Analysis steps

A

1- Discover entities, relationships, and attributes
2- Determine cardinality
3- Distinguish strong and weak entities
4- Create super type and subtype entities

107
Q

Logical Design Steps

A

5- Implement entities
6- Implement relationships
7- Implement attributes
8- Apply normal form (eliminate redundancy)

108
Q

Cardinality refers to ______ and _______ of relationships and _______

A

maxima
minima
attributes

109
Q

Relationship maximum

A

Greatest number of instances of one entity that can relate to a single instance of another entity.

110
Q

Relationship minimum

A

Least number of instances of one entity that can relate to a single instance of another entity.

111
Q

In ER diagrams, attribute maximum and minimum follow the _____ name. The minimum appears in ________.

A

attribute
parentheses

112
Q

A ______ entity is a subset of another entity type, called the _____ entity.

A

subtype
supertype

113
Q

IsA

A

supertype entity identifies its subtype entities

114
Q

Partition of a _____ entity is a group of mutually exclusive ______ entities

A

supertype
subtype

115
Q

After entities, ____, ____, ____, and strong and weak entities are determined, the database designer looks for ____ and ____ entities.

A

relationships
attributes
cardinality
supertypes
subtypes

116
Q

Crow’s foot notation

A

Depicts cardinality as a circle (zero), a short line (one), or three short lines (depicts a bird’s foot).

117
Q

Intangible entity

A

Not tracked with data in the database

118
Q

Artificial key

A

Single column primary key by the database designer when no suitable single-column or composite primary key exists.

119
Q

Functional Dependence

A

Dependence of one column on another

120
Q

Redundancy (normalization)

A

Repetition of related values in a table

121
Q

Normal Forms

A

Rules for designing tables with less redundancy

122
Q

Candidate Key

A

Simple or composite column that is unique and minimal.

123
Q

Boyce-Codd normal form

A

Ideal for tables with frequent inserts, updates, and deletes.

124
Q

Normalization

A

Eliminates redundancy by decomposing a table into two or more tables

125
Q

Denormalization

A

Intentionally introducing redundancy by merging tables

126
Q

Heap table

A

No order is imposed on rows
Optimize insert operations
Fast for bulk load of many rows

127
Q

Hash table

A

Rows are assigned to buckets

128
Q

Table scan

A

Database operation that reads table blocks directly, without accessing an index

129
Q

Index scan

A

database operation that reads index blocks sequentially, in order to locate the need table blocks

130
Q

Hit ratio (filter factor or selectivity)

A

Percentage of table rows selected by a query

131
Q

Hash Index

A

Entries assigned to buckets

132
Q

Bitmap Index

A

Grip of bits
Contains ones and zeroes

133
Q

Tablespace

A

Database object that maps one or more tables to a single file
CREATE TABLESPACE