New Factoids to remember Flashcards
(23 cards)
Identify the data type that accepts character data; only the required number of bytes are used in the storage medium.
VARCHAR
Identify the data type that accepts fixed length character data of up to 2000 characters.
CHAR
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.
BLOB
This datatype is used to store unicode character-based data, such as large documents in any character set.
CLOB
The logical order of operators is
NOT, AND, OR
The query “DELETE FROM Product_T;” will
Remove all rows from the Product_T table, assuming there are no referential integrity constraints
Identify two advantages of dynamic views
- 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.
4 Characteristics of a Materialized view
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
T/F - A database admin drops a materialized view, the table from which the view was created will also be dropped
False
Virtual table and logical view are other names for a
dynamic view
What is the result of the following statement on the city table in the world database.
UPDATE City
SET Population = 500000;
This statement will set the population of all cities in the city table to 500000
The purpose of Indexes
Speed up query efficiency for specific tables/columns
During a transaction, when changes are executed successfully the transaction is ready to be ___________, when we want to undo the changes, we can _______
committed, rollback
When a transaction ends explicitly it encountered a
When a transaction ends implicitly it encountered a
Commit or rollback
DDL statement
ACID - A
Atomic - Every statement within the group (unit of work is required to be performed successfully
All or nothing - one thing fails everything fails
ACID - C
Consistent - The state of the database is modified only when a transaction is committed successfully
This ensures protection of data
ACID - I
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
ACID - D
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
SET auto-commit
Used to enable or disable auto-commit mode for the current transaction
Inside of a transaction, this ensures that all statements performed after it can be rolled back
Savepoint
ROLLBACK TO SAVEPOINT
Rolls back transactions to the savepoint provided ensuring that no transaction is undone
RELEASE SAVEPOINT
Removes the given savepoint without changing the effects of queries
Savepoint syntax
SAVEPOINT name_of_savepoint
ROLLBACK TO SAVEPOINT name_of_savepoint