OA Questions Flashcards

(91 cards)

1
Q

Software that reads and writes data in a database:

A

DBMS

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

Software that helps business users interact with database systems:

A

Database Application

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

Responsible for securing the database system against unauthorized users:

A

Database Administrator

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

Determines the format of each data element and the overall database structure:

A

Database Designer

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

Develops computer programs that utilize a database:

A

Database Programmer

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

Data about the database, such as column names and the number of rows in each table:

A

Metadata

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

SQL stands for:

A

Structured Query Language

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

Database design phases:

A
  1. Analysis
  2. Logical Design
  3. Physical Design
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

This design phase implements database requirements in a specific database system. Converts entities, relationships, and attributes into tables, keys, and columns.

A

Logical Design

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

This design phase adds indexes and specifies how tables are organized on storage media.

A

Physical Design

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

The principle that physical design never affects query results and allows database designers to tune query performance without changes to application programs:

A

Data Independence

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

How data is organized (eg: relational/table or graph)

A

Data Structure

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

An ordered collection of elements enclosed in parentheses:

A

Tuple

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

Computes functions over multiple table rows, such as sum and count:

A

Aggregate

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

Selects all rows of two tables:

A

Union

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

Combines two tables by comparing related columns:

A

Join

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

The language which defines the structure of the database:

A

DDL: Data Definition Language

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

The language which retrieves data from the database:

A

DQL: Data Query Language

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

The language which manipulates data stored in a database:

A

DML: Data Manipulation Language

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

The language which controls database user access:

A

DCL: Data Control Language

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

The language which manages database transactions:

A

DTL: Data Transaction Language

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

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

A

ALTER TABLE

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

Integer type allocation size and value ranges:

A

TINYINT (1B)
SMALLINT (2B)
MEDIUMINT (3B)
INT/INTEGER (4B)
BIGINT (8B)

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

Operator which divides one numeric value by another and returns the integer remainder:

A

% (modulo)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
A special value that represents either unknown or inapplicable data:
null
26
INSERT statement boilerplate:
INSERT [INTO] TableName (Column1, Column2, ...) VALUES (Value1, Value2, ...);
27
What is the result of the following statement: DELETE FROM Table; What keyword/clause would increase selectivity?
All rows in the Table table are deleted. WHERE
28
What single statement deletes all rows from a table.
TRUNCATE
29
What statement selects data from one table, called the source, and inserts the data to another table, called the target?
MERGE
30
A primary key made of multiple columns:
Composite primary key
31
A rule that governs allowable values in a database:
Constraint
32
A constraint that ensures that values in a column, or group of columns, are unique:
UNIQUE
33
A constraint that specifies an expression on one or more columns of a table:
CHECK
34
An operator which matches text against a pattern using the two wildcard characters % and _.
LIKE
35
Processes values from a set of rows and returns a summary value:
Aggregate function
36
Clause used with GROUP BY to filter group results:
HAVING
37
When duplicate column names appear in a query, the names must be distinguished with a:
prefix
38
To simplify queries or result tables, especially when using a prefix, a column name can be replaced with an:
ALIAS
39
To select all left table rows, but only matching right table rows, use a:
Left Join
40
Any join that selects unmatched rows, including left, right, and full joins, is an:
Outer Join
41
To select all left and right table rows, regardless of match:
Full Join
42
This keyword combines joins into one table:
UNION
43
Compares columns of two tables with the = operator. Most joins are these.
Equijoin
44
Joins a table to itself as long as the columns have comparable data types. Aliases are necessary.
Self-join
45
All possible combinations of rows from both tables appear in the result when this is join is used:
Cross-join
46
A view for which updates on source fields are recomputed and stored:
Materialized View
47
Clause which rejects inserts and updates that do not satisfy the view query WHERE clause, providing sensible errors to users.
WITH CHECK OPTION
48
A relationship which relates an entity to itself:
Reflexive
49
This document notes additional detail in text format, including names, synonyms, and descriptions of entities, relationships, and attributes:
Glossary AKA Data Dictionary AKA Repository
50
A set of the same kind of element:
Type
51
An element within a set of similar types:
Instance
52
This step of design develops an entity-relationship model, capturing data requirements while ignoring implementation details:
Analysis
53
Analysis stages:
1. Discover elements 1. Determine cardinality 1. Distinguish strong vs weak entities 1. Enumerate sub and supertype entities
54
Logical design stages:
1. Implement A. Entities B. Relationships C. Attributes 2. Normalize
55
Maxima and minima of relationships and attributes are referred to as:
Cardinality
56
In ER diagrams, attribute maximum and minimum ______ the attribute name. The minimum appears in ________.
Follow; parentheses
57
A unique, singular, and required attribute is referred to as:
Identifying
58
This kind of entity has one or more identifying attributes:
Strong
59
A _______ entity does not have an identifying attribute, but rather has an _______ relationship.
Weak; Identifying
60
In an ER diagram, an identifying relationship has a _______ next to the ________ entity.
Diamond; Identifying
61
A relationship identifying subtypes of a supertype is called:
IsA
62
A supertype entity is diagramed as a group of mutually exclusive subtype entities in a:
Partition
63
Subtypes within a partition are _______ aligned, while those in different partitions are ________ aligned.
Vertically; Horizontally
64
A primary key is, ideally:
Simple Stable Meaningless
65
A single-column primary key created by the database designer when no suitable single-column or composite primary key exists:
Artificial Key
66
Dependence of one column on another:
Functional Dependence
67
Repetition of related values in a table:
Redundancy
68
Form when every non-key column depends on the primary key and there are no duplicate rows:
First Normal Form
69
Form when all non-key columns depend on the whole primary key and not only a part of one, if composite:
Second Normal Form
70
Form when all NON-KEY columns depend on the key, the whole key, and nothing but the key:
Third Normal Form
71
A simple or composite column that is unique and minimal is a ______ key:
Candidate
72
Form when all dependencies are on unique columns:
Boyce-Codd Normal Form
73
When the columns of A are a subset of the columns of B, A always depends on B and the dependency is known as:
Trivial
74
Steps to achieve Boyce-Codd Normal Form:
1. Identify all unique columns 2. Identify dependencies on non-unique columns 3. Move non-unique dependents to a foreign table
75
A scheme for organizing rows in blocks on storage media is known as:
Table Structure
76
A table structure wherein no order is imposed on rows, ideal for _______ operations:
INSERT/bulk load, Heap
77
A table structure wherein a column determines physical row order, assigned to blocks by a given range and ideal for _______, ________, and ________:
JOIN, WHERE, ORDER BY on the sorted column; Sorted
78
A table structure wherein rows are assigned to linked blocks within ______s by a _____ _____ ____:
Bucket; Dynamic Hash Function; Hash
79
Modulo Hash Function algorithm:
1. Convert the key to int 2. Divide by the number of blocks 3. Remainder becomes bucket number 4. Bucket number converts to physical block address containing the row
80
A table structure interleaving rows of multiple tables:
Cluster
81
The percentage of table rows selected by a query:
Hit ratio AKA Filter factor AKA Selectivity
82
An index containing an entry for every table block (as opposed to every row) is:
Sparse
83
An index containing an entry for every table row is:
Dense
84
The number of multi-level index entries per block is called:
fan-out
85
In a B_tree multi-level index values/pointers appear in intermediate levels. In a B_tree, they appear only at the bottom level.
B-tree; B+tree
86
A _____ index is a secondary index pointing to a primary with physical addresses:
Logical
87
A ______ index contains the return value processed on columns:
Function
88
A database object that maps one or more tables to a single file:
Tablespace
89
A statement that generates a result table to describe how a statement is executed by the storage engine:
EXPLAIN
90
Physical design stages:
1. Create indexes 2. Review the Slow Query Log 3. EXPLAIN slow queries 4. CREATE or DROP indexes 5. Consider table partitions
91