Databases and Datamining Flashcards

1
Q

What does an inner join do?

A

Returns records that have matching values in both tables. This is sometimes called a simple join and is the one created by the use of the WHERE clause to create the join.

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

What does a left (outer) join do?

A

Return all records from the left table, and the matched records from the right table (i.e. only those rows from the right table where the joined fields are equal (join condition is met)).

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

What does a right (outer) join do?

A

Return all records from the right table, and the matched records from the left table (i.e. only those rows from the left table where the joined fields are equal (join condition is met)).

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

What does a full (outer) join do?

A

Return all records when there is a match in either left or right table.

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

When are stored procedures useful?

A

When multiple client applications are written in different languages or work on different platforms, but need to perform the same database operations.
When security is paramount.
Stored routines also enable libraries of functions to be present in the database server.

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

What is transaction management?

A

It handles all transactions properly in DBMS. Database transactions are the events or activities such as series of data read/write operations on data object(s) stored in database system.

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

What is concurrency control?

A

It’s a process to ensure that data is updated correctly and appropriately when multiple transactions are concurrently executed in DBMS.
Concurrency control is a mechanism for ensuring correctness when two or more database transactions that access the same data or data set are executed concurrently with a time overlap.

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

What is pessimistic concurrency control?

A

It control delays the transactions if they conflict with other transactions at some time in the future by locking or a time-stamping technique.

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

What is optimistic concurrency control?

A

It assumes that conflict is rare and thus allows concurrent transactions to proceed without imposing delays then checks for conflicts only at the end, when a transaction commits.

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

What are the strengths of pessimistic concurrency control?

A

Guarantee that all transactions can be executed correctly.
Data is properly consistent by either rolling back to the previous state (Abort operation) or new content (Commit operation) when the transaction conflict is cleared.
Database is relatively stable and reliable.

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

What are the weaknesses of pessimistic concurrency control?

A

Transactions are slow due to the delay by locking or time-stamping event.
Runtime is longer. Transaction latency increases significantly.
Throughput or the amount of work (e.g. read/write, update, rollback operations, etc.) is reduced.

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

What are the strengths of optimistic concurrency control?

A

Transactions are executed more efficiently.
Data content is relatively safe.
Throughput is much higher.

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

What are the weaknesses of optimistic concurrency control?

A

There is a risk of data interference among concurrent transactions since conflict may occur during execution. In this case, data is no longer correct.
Database may have some hidden errors with inconsistent data; even the conflict check is performed at the end of transactions.
Transactions may be in deadlock that causes the system to hang.

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