New Factoids to remember Flashcards

(23 cards)

1
Q

Identify the data type that accepts character data; only the required number of bytes are used in the storage medium.

A

VARCHAR

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

Identify the data type that accepts fixed length character data of up to 2000 characters.

A

CHAR

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

In one of the the tables in the database at Ottawa Civic Hospital, X-Ray, MRI scans and other digital images are stored. Identify the datatype for storage of these images.

A

BLOB

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

This datatype is used to store unicode character-based data, such as large documents in any character set.

A

CLOB

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

The logical order of operators is

A

NOT, AND, OR

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

The query “DELETE FROM Product_T;” will

A

Remove all rows from the Product_T table, assuming there are no referential integrity constraints

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

Identify two advantages of dynamic views

A
  • It can simplify large queries into shorter forms of views.
  • It can facilitate access control by allowing selected rows and/or columns in a view.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

4 Characteristics of a Materialized view

A

Needs refreshing each time in order to update results

Less recent data, faster loading

CPU intense queries can be run periodically instead of every time you need a report

Occupies hard disk space

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

T/F - A database admin drops a materialized view, the table from which the view was created will also be dropped

A

False

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

Virtual table and logical view are other names for a

A

dynamic view

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

What is the result of the following statement on the city table in the world database.

UPDATE City

SET Population = 500000;

A

This statement will set the population of all cities in the city table to 500000

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

The purpose of Indexes

A

Speed up query efficiency for specific tables/columns

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

During a transaction, when changes are executed successfully the transaction is ready to be ___________, when we want to undo the changes, we can _______

A

committed, rollback

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

When a transaction ends explicitly it encountered a

When a transaction ends implicitly it encountered a

A

Commit or rollback

DDL statement

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

ACID - A

A

Atomic - Every statement within the group (unit of work is required to be performed successfully

All or nothing - one thing fails everything fails

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

ACID - C

A

Consistent - The state of the database is modified only when a transaction is committed successfully

This ensures protection of data

17
Q

ACID - I

A

Isolation - Ensures that every operation within the group or unit of work designated for transaction is operated independently

Also means the statements are transparent to each other

18
Q

ACID - D

A

Durability - When a transaction is committed, it is permanent

Ensures that results obtained when transactions have been successfully executed are kept, even if the system failure

19
Q

SET auto-commit

A

Used to enable or disable auto-commit mode for the current transaction

20
Q

Inside of a transaction, this ensures that all statements performed after it can be rolled back

21
Q

ROLLBACK TO SAVEPOINT

A

Rolls back transactions to the savepoint provided ensuring that no transaction is undone

22
Q

RELEASE SAVEPOINT

A

Removes the given savepoint without changing the effects of queries

23
Q

Savepoint syntax

A

SAVEPOINT name_of_savepoint

ROLLBACK TO SAVEPOINT name_of_savepoint