Chapter 6 - Database Administration Flashcards

1
Q

What are the Database Administration-Related Terms?

A

Data administration - a function that applies to an entire org concerning data privacy and security.
Database administration - More technical function that is specific to a particular database
Database administrator - Person in charge of a database and facilitates the development of use of it

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

Figure 6.2

A

The database processing environment

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

What is Concurrency Control?

A

It ensures that one user’s work does not inappropriately influence another user’s work. The difficulty is balancing strict and lenient levels

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

How do users work in a Database?

A

Users submit work in the form of transactions, also known as logical units of work (LUWs)

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

What is an Atomic Transaction?

A

One where a series of actions are taken on a database such that all of them are performed successfully or none of them are performed at all. Nothing is partially processed

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

What are the Typical Problems that may occur when many users process work in a database At the Same Time?

A

Lost Update (Concurrent Problem) - If one user’s update overwrites another’s
Inconsistent Read - One user reads data that have been processed by only a portion of another user’s transaction

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

Figure 6.5

A

Example of the Lost Update Problem

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

What is Resource Locking?

A

It prevents concurrent processing problems by disallowing sharing by locking data that are retrieved for update

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

What are the Four (4) Types of Resource Locks?

A

Explicit Locks: Lock resources by placing ‘commands’ explicitly
Implicit Locks: A DBMS places locks because it needs to control resources
Exclusive Locks: Lock resources from any type of access
Shared Locks: Locks an item from being changed but not from being read

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

What does Serializable mean in regards to Transactions?

A

Concurrent transactions are processed in ‘an arbitrary serial fashion’ so that the database is maintained in a logically consistent state.

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

What is Two-Phased Locking?

A

A method to achieve serializable transactions. It lets locks be obtained and released as they are needed.

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

What are the Two Phases of Two-Phased Locking?

A

Growing Phase - When the transaction continues to request additional locks
Shrinking Phase - When the transaction begins to release the locks

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

What is a Deadlock?

A

AKA Deadly Embrace; When two transactions indefinitely wait on each other to release locks on resources.

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

What is the Difference between Optimistic and Pessimistic Locking?

A

Optimistic locking assumes that no conflict will occur thus no errors will occur.

Pessimistic locking assumes that conflict will occur, thus locks are issued.

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

What is the SQL Transaction Control Language (TLC)? (Note: SQL syntax varies between DBMS products)

A

SQL BEGIN TRANSACTION statement
SQL COMMIT TRANSACTION statement
SQL ROLLBACK TRANSACTION statement

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

What does it mean when a Transaction is ACID?

A

Atomic
Consistent
Isolation
Durable

17
Q

What is an Atomic Transaction?

A

It is a transaction in which all of the database actions occur, or none of them do

18
Q

What is a Consistent Transaction?

A

A consistent transaction means that no other transactions are permitted on the records until the current transaction finishes.

19
Q

What is Isolation as it regards to ACID Transactions?

A

Different transactions may be operating on the same data which can result in continuously changing data content. It is controlled by setting the “isolation levels” to prevent data read problems.

20
Q

What is a Durable Transaction?

A

A durable transaction is one in which all committed changes are permanent.

21
Q

What are the Three (3) Types of Data Read Problems?

A

Dirty Read (DR) - Reads changed data that is uncommitted. If it’s rolled back, the transaction has incorrect data.
Nonrepeatable Read (NR) - Rereads changed data but finds committed changes in between
Phantom Read (PR) - Rereads data and finds new rows inserted

22
Q

Which Data Read Problems are possible on each Isolation Level?

A

Read Uncommitted - All 3 Possible
Read Committed - NR and PR possible; DR not possible
Repeatable Read - PR possible; DR and PR not possible
Serializable - None possible

23
Q

What is a Cursor?

A

A cursor is a pointer into a set of rows that is the result set from a SQL SELECT statement.

24
Q

What are the Cursor Types?

A

Either: Forward only (one way) or scrollable (both ways)
Static - Takes a snapshot and processes it
Dynamic - A fully featured cursor
Keyset - Combines some features of static and dynamic

25
Q

Database Security strives to Ensure what Two Things?

A

Authentication - You are who you you’re supposed to be. Password/login/etc.
Authorization - You have the permissions you’re supposed to have

26
Q

What is the Principle of Database Security Admin?

A

Permissions are given to groups/roles, not to individual users unless needed

27
Q

What are the Seven (1-4) DBMS Security Guidelines?

A
  1. Run the DBMS behind a firewall
  2. Apply the latest OS and DBMS service packs and fixes
  3. Limit DBMS functionality to needed features
  4. Protect the computer that runs the DBMS
28
Q

What are the Seven (5-7) DBMS Security Guidelines?

A
  1. Manage Accounts and Passwords
  2. Encrypt sensitive data transmitted across the network
  3. Encrypt sensitive data stored in databases
29
Q

How is Application-Level Security applied?

A

When application security is executed on the web server computer, sensitive security data does not need to be transmitted over the network

30
Q

What is Recovery via Reprocessing? What are the downsides?

A

All activities since the backup was performed are redone. Takes a long time and might never catch up if the system is heavily scheduled

31
Q

What is Recovery via Rollback and Rollforward?

A

Log File - A mechanism to record database activities
Before Images - Copy of every DB record before it was changed (use this to undo or rewind or rollback transactions)
After Images - Copy of every DB record after it was changed (use this to redo or rollforward or fast-forward transactions)

32
Q

What are Additional DBA Responsibilities?

A

Ensure a system exists to gather and record user-reported error and other problems.

Create and manage a process for controlling the database configuration

33
Q

What do Service Level Agreements (SLAs) do?

A

It covers backups, application response time, and error reporting

34
Q

What is an Index? Why do you Need it? Why is it Useful? Advice?

A

It is a component of the physical database design. It can speed up a data access and improve a read performance.

Advice is do not create unnecessary indexes as they slow down database update performances.

35
Q

Which Fields are Prime Candidates to add indexes? What are the Disadvantages?

A

Frequently used fields. EMPLOYEE Name, SSN, dob, phone #.

Disadvantages are it uses storage space and the DBMS must update the index when the data gets updated.