FINAL EXAM Flashcards

1
Q

Purpose of a Database

A
  • Keep track of things

- Store information that is more complicated than a simple list

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

Problems with Lists

A
  • Redundancy

- Multiple Themes

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

List Modification Issues

A
  • Deletion
  • Update
  • Insertion
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What causes modification issues?

A
  • Redundancy

- Multiple Themes

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

Relational Database

A
  • Stores each topic in its own table
  • Breaks up a list
  • More complicated than a list
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does a relational database do?

A
  • Minimizes redundancy, preserves relationships, and allows partial data.
  • Gives foundation for user forms and reports
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Four Components of a Database System?

A
  • Users
  • Database Application
  • Database Management System (DBMS)
  • Database
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

DBMS

A
  • Database Management System
  • Serves as an intermediary between database applications and the database
  • Manages and controls database activities
  • Creates, processes, and administers the databases it controls
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Functions of a DBMS

A
  • Create databases, tables, supporting structures
  • Read data
  • Modify data
  • Maintain structures
  • Enforce rules
  • Control concurrency
  • Provide security
  • Perform backup and recovery
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Referential Integrity Constraints

A
  • Ensure that the values of a column in one table are valid based on the values in another table
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Table

A
  • Same as file and relation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

File

A
  • Same as table and relation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Relation

A
  • A two-dimensional table that has specific characteristics
  • The table dimensions consist of rows and columns
  • Same as table and file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Row

A
  • Same as record and tuple
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Record

A
  • Same as row and tuple
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Tuple

A
  • Same as record and row
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Column

A
  • Same as field and attribute
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Field

A

-Same as column and attribute

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

Attribute

A
  • Same as column and field
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Unique Key

A
  • Data value is unique for each row

- Consequently, the key will uniquely identify a row

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

Nonunique Key

A
  • Data value may be shared among several rows
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Composite Key

A
  • A key that contains two or more attributes

- For a key to be unique, it must often become a composite key

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

Candidate Key

A
  • A “candidate” to become the primary key, value is used to find the value of every attribute in the table
  • Contains only one attribute
  • A unique key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Primary Key

A
  • Main key for the relation

- If you know the value of the primary key, you will be able to uniquely identify a single row

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

Foreign Key

A
  • A primary key from one table placed into another table

- The key is called a foreign key in the table that received the key

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

Surrogate Key

A
  • A unique, numeric value that is added to a relation to serve as the primary key
  • Values have no meaning to users and are usually hidden on forms, queries, and reports
  • Often used in place of a composite key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Functional Dependency

A
  • A relationship between attributes in which one attribute (or group of attributes) determines the value of another attribute in the same table
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Normalization Concept

A
  • A process of analyzing a relation to ensure that it is well formed
  • If a relation is normalized (well formed), rows can be inserted, deleted, or modified without creating update anomalies
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Normalization Principles

A
  • Every determinant must be a candidate key

- Any relation that is not well formed should be broken into two or more well-formed relations

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

Normal Forms

A
  • First Normal Form
  • Second Normal Form
  • Third Normal Form
  • Boyce-Codd Normal Form
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

SQL

A
  • Structured Query Language
  • Data sublanguage
  • Compromised of DDL, DML, DLC
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

DDL

A
  • Create Table
  • Alter Table
  • Drop Table
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

DML

A
  • Select
  • Update
  • Insert
  • Delete
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

SQL Data Retrieval : Match Criteria

A

( = < > <= )

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

SQL Data Retrieval : Match Operators

A
  • AND : Representing an intersection of the data sets
  • OR : Representing a union of the data sets
  • Example:
    select * from quote
    where quoteid=3 and projectid= 2;
36
Q

SQL Data Retrieval : List of Values

A
  • The WHERE may include the IN keyword to specify a particular column value must be included in a list of values
  • Example:
    SELECT EmpName
    FROM EMPLOYEE
    WHERE DeptID IN (4,8,9);
37
Q

SQL Data Retrieval : The Logical NOT Operator

A
  • Any criteria statement may be preceded by a NOT operator, which is to say that all information will be shown except that information matching the specified criteria
  • Example:
    SELECT EmpName
    FROM EMPLOYEE
    WHERE DeptID NOT IN (4,8,9);
38
Q

SQL Data Retrieval : Finding Data in a Range of Values

A
  • BETWEEN keyword allows a user to specify a minimum and maximum value on one line
  • Example:
    SELECT EmpName
    FROM EMPLOYEE
    WHERE SalaryCode BETWEEN 10 AND 15;
39
Q

SQL Data Retrieval : Allowing for Wildcard Searches

A
  • LIKE keyword allows searches on a partial data value
  • LIKE is paired with wildcard values (% for multiple character wildcards, _ for single character wildcard)
  • Example:
    SELECT EmpID
    FROM EMPLOYEE
    WHERE EmpName LIKE ‘Kr%’;
40
Q

SQL Data Retrieval : Sorting Results

A
  • ORDER BY clause sorts results
  • Example:
    SELECT *
    FROM EMPLOYEE
    ORDER BY EmpName
41
Q

COUNT

A
  • Counts the number of rows that match the specified criteria
    SELECT COUNT(DeptID)
    FROM EMPLOYEE;
42
Q

MIN

A
  • Finds the minimum value for a specific column for those rows matching the criteria
  • Example:
    SELECT MIN(Hours) AS MinimumHours
    FROM PROJECT
    WHERE ProjID > 7;
43
Q

MAX

A
  • Finds the maximum value for a specific column for those rows matching the criteria
  • Example:
    SELECT MAX(Hours) AS MaximumHours
    FROM PROJECT
    WHERE ProjID > 7;
44
Q

SUM

A
  • Calculates the sum for a specific column for those rows matching the criteria
  • Example:
45
Q

AVG

A
  • Calculates the numerical average of a specific column for those rows matching the criteria
  • Example:
    SELECTAVG(Hours) AS AverageHours
    FROM PROJECT
    WHERE ProjID > 7;
46
Q

GROUP BY

A
  • Subtotals may be calculated by using the GROUP BY clause.
  • Example:
    SELECT DeptID,
    COUNT(*) AS NumOfEmployees
    FROM EMPLOYEE
    GROUP BY DeptID
47
Q

HAVING

A
  • The HAVING clause may be used to restrict which data is displayed
  • Example:
    SELECT DeptID,
    COUNT() AS NumOfEmployees
    FROM EMPLOYEE
    GROUP BY DeptID
    HAVING COUNT(
    ) > 3;
48
Q

Elements of E-R Diagram

A
  • Entities
  • Attributes
  • Identifiers
  • Relationships
49
Q

Entity

A
  • Something of importance to a user that needs to be represented in a database.
  • An entity represents one theme or topic.
  • Entities are restricted to things that can be represented by a single table.
50
Q

Weak Entity

A
  • An entity that cannot exist in the database without the existence of another entity.
51
Q

Strong Entity

A
  • Any entity that is not a weak entity
52
Q

ID-Dependent

A
  • An ID-Dependent weak entity is a weak entity that cannot exist without its parent entity.
53
Q

Non ID-Dependent

A
  • A non-ID-dependent weak entity may have a single or composite identifier, but the identifier of the parent entity will be a foreign key.
54
Q

Associative entity

A
  • Used when there are attributes that are associated with the relationship between two entities rather than with either of the two entities themselves.
55
Q

Subtype entity

A
  • Subtypes can be exclusive or inclusive
  • If exclusive, the supertype relates to at most one subtype.
  • If inclusive, the supertype can relate to one or more subtypes.
56
Q

Relationships

A
  • Entities can be associated with one another.
57
Q

Relationship Degree

A
  • Defines the number of entity classes participating in the relationship:
    –Degree 2 is a binary relationship.
    –Degree 3 is a ternary relationship.
58
Q

1:1

A

–A single entity instance in one entity class is related to a single entity instance in another entity class.

59
Q

1:N

A

–A single entity instance in one entity class is related to many entity instances in another entity class.

60
Q

N:M

A

–Many entity instances in one entity class is related to many entity instances in another entity class

61
Q

Maximum Cardinality

A
  • The maximum number of entity instances that may participate in a relationship instance—one, many, or some other fixed number.
62
Q

Minimum Cardinality

A
  • The minimum number of entity instances that must participate in a relationship instance.
  • These values typically assume a value of zero (optional) or one (mandatory).
63
Q

Recursive

A
  • It is possible for an entity to have a relationship to itself
64
Q

Transforming a Data Model into a Relational Design

A
  1. Create a table for each entity:
    - Specify primary key
    - Specify properties for each column (data type, null status, default value, specify data constraints)
    - Verify normalization
  2. Create relationships by placing foreign keys:
    - Strong entity relationships (1:1, 1:N, N:M)
    - ID-Dependent and non-ID Dependent weak entity relationships
    - Subtypes
    - Recursive
65
Q

Intersection Table

A
  • To create a N:M relationship, a new table is created.

- An intersection table has a composite key consisting of the keys from each of the tables that it connects

66
Q

Association

A
  • When an intersection table has columns beyond those in the primary key
67
Q

Supertype/Subtype Relationships

A
  • The identifier of the supertype becomes the primary key and the foreign key of each subtype
68
Q

Database Administration Functions

A
  • Concurrency Control
  • Security
  • Backup
  • Recovery
69
Q

Concurrency Control

A
  • Ensures that one user’s actions do not impact another user’s actions.
70
Q

Implicit Locks

A
  • Issued automatically by the DBMS based on an activity.
71
Q

Explicit Locks

A
  • Issued by users requesting exclusive rights to the data.
72
Q

Two-Phased Locking

A
  • Lets locks be obtained and released as they are needed.
  • A growing phase, when the transaction continues to request additional locks
  • A shrinking phase, when the transaction begins to release the locks
73
Q

Deadlock

A
  • When two transactions may indefinitely wait on each another to release resources
74
Q

Consistent Transactions (ACID)

A

–Atomic
–Consistent
–Isolated
–Durable

75
Q

Database Security Guidelines

A
  • Run the DBMS behind a firewall
  • Apply the latest operating system and DBMS service packs and patches
  • Limit DBMS functionality to needed features
  • Protect the computer that runs the DBMS
  • Manage accounts and passwords
76
Q

Rollback

A

–Log files save activities in sequence order.
–It is possible to undo activities in reverse order that they were originally executed.
–This is performed to correct/undo erroneous or malicious transaction(s) after a database is recovered from a full backup.

77
Q

Rollforward

A

–Activities recorded in the log files may be replayed.
–In doing so, all activities are re-applied to the database.
–This procedure is used to resynchronize restored database data by adding transactions to the last full backup.

78
Q

Atomic

A
  • One in which all of the database actions occur or none of them do.
79
Q

Consistent

A
  • No other transactions are permitted on the records until the current transaction finishes
80
Q

Isolation

A
  • Within multiuser environments, different transactions may be operating on the same data
81
Q

Durable

A
  • One in which all committed changes are permanent.
82
Q

Database Security

A
  • Strives to ensure that only authenticated users perform authorized activities
83
Q

Internet Application Processing Environment

A

-Internet Application Processing is more complicated than traditional application processing.
-Specifically, with Internet Application Processing
–The network becomes an integral part of the application.

84
Q

Application Programming Interface (API)

A

–An API is a collection of objects, methods and properties for executing DBMS functions from program code.
–Each DBMS has its own API, and APIs vary from one DBMS product to another.

85
Q

N-Tier Architecture

A

-Tiers refer to the number of computers involved in the Web database application.
–The workstation with Web browser is the first tier.
–Two-tier architecturemeans that the Web server and the DBMS are on the same server.
–Three-tier architecturemeans that the Web server and the DBMS are on separate servers.