• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/47

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

47 Cards in this Set

  • Front
  • Back

Weak entity Types

Do not have key attributes of their own. Identified by being related to instances of other entities. Maintain a foreign key to the identifying entity. Total participation.

Domains

set of atomic values associated with entity type

Composite attribute

Can be further divided into subparts

Multi valued attribute

Can have more than one value at a time for an attribute

Superkey

An attribute or set of attributes which can be used to identify a distinct tuple in a relation.

Key

A minimal superkey, a superkey where removing any of the attributes leaves it not a superkey.

Candidate key

One of the minimal superkeys which can be used to uniquely identify any distinct tuple in a relation.

Primary key

One of the candidate keys is designated to be the primary key.

Foreign key

A set of attributes in a relation which can be used to refer to tuples in another relation. This is due to the domains of the foreign key and the primary key being the same.

First normal form

All attribute values are atomic and single values. I.e. no multivalued or composite attributes. Designed to remove repeating groups.

2NF

1NF and every non-key attribute is fully functionally dependent on the primary key. Designed to remove partial dependencies.

3NF

2NF and every non-key attribute is non-transitively dependent on the primary key.

PL/SQL stored subprogram

Named unit (block) of code stored permanently in the database. Compiled seperately.

PL/SQL Anonymous Block

Program unit that has no name, is not stored in the database, and is compiled each time it is executed.

PL/SQL Stored subprogram procedure

Designed to change data inside of a database when executed. Sometimes has a return value.

PL/SQL Stored subprogram Function

Designed to always return a value. Does not change data, more of a retriever. Called in a statement.

Trigger

A stored subprogram associated with a table, automatically invoked as a reaction to specified changes to a database. Never returns a value.

Some trigger uses

Enforce complex business rules. Enforcing some types of referential integrity. Auditing purposes. Generating values for derived attributes. Creating replica tables or backups.

Transaction

A sequence of operations on a database which is either completely executed or not at all.

Transaction rollback

When errors occur during a transaction, any changes that have been made as a part of the transaction are undone, as the database may be in an inconsistent state.

Transaction commit

When a transaction executes without any errors, the database should be in a stable state after the transaction work is successful. Changes made are commited (saved).

ACID

The four properties transactions must have to deal with failures and concurrency problems.

Atomicity

The first property in ACID. Requires that each transaction is all or nothing. Execute in an atomic fashion.

Isolation

3rd property of ACID. Logical isolation between transactions. A transactions updates are not visible to other transactions until it either commits or rollbacks. This avoids the dirty read problem.

Durability

4th property of ACID. Once a change has been made to a database following a transaction, this commited change must persist regardless of failures until it is changed again.

Consistency

3rd property of ACID. A transaction performed on a consistent database must result in a still consistent database.

Lost update problem

Concurrency problem where the update made by one transaction is overriden by another transaction.

Temporary update problem (dirty read)

Concurrency problem where one transaction reads a value before the value has been committed by another transaction mid way through a process. The first transaction will become invalid and fail.

Incorrect Summary problem

Concurrency problem where a transaction reads some value to perform an operation e.g


To find the average, and another transaction updates the value during the transaction. This value will now be incorrect to find the average.

Locking algorithm

If transaction A holds a write lock on object p, then a request from other transactions for either a read or write lock on p will be denied. If transaction A holds a read lock on p, then only write locks will be denied to other transactions.

Two phase locking

Growing phase: locks are obtained, not released



Shrinking phase: locks are released, no new locks are acquired.



Ensures seriability.

Variations of 2-phase locking

Conservative: locks all items before the transaction begins.



Strict 2PL (most common): does not release any write locks until commit or rollback.

View

A Virtual table derived from other base tables or previously defined views with a select statement.


Doesn't necessarily exist in physical forms.


Provides a security and access control mechanism.


Allows easier access to elements of a table that may be accessed more frequently.

View Materialization

Creates a physical temporary view table when a view is first queried.


DBMS Incrementally updates tuples as they are manipulated.


If the view is not queried for a certain period of time, the system may remove the physical table and recompute it from scratch when future queries reference the view.

Discretionary Database security

A given user may have different access rights to different objects at the relation level. Access control for the relations themselves. Different users may have different rights on the same object. Discretionary is flexible, give or not give access. Each table has an owner with all privileges who can pass on privileges to other users.

Mandatory Database security

Each object is tagged with a classification level. Users are given clearance levels. Rigid system similar to a military or government.


Top secret > Secret > confidential > none.

Bell lapadula Model mandatory access control

Simple Security Property:


Users cannot read any data above their level, only at the same level or below.




Star Property:


Cannot write any data to the lower layer.


This is so they cannot lower the clearance of data to the lower levels of security.





Indexes

Additional files on a disk which provide alternative ways to access records inside a database without affecting the physical placement of records on the disk.


The index itself consists of a key field together with a list of pointers to disk blocks.

Single-level ordered Index - Primary index

For an ordered file whose ordering field is a key. A primary index is an ordered file whose records are of fixed length with two fields.


- Data from the ordering key field


- Pointer to the data block


A primary index is a Sparse (non-dense) index; meaning it only has index entries for some of the search values.

Single-level ordered Index - Clustered index

For an ordered file whose ordering field is not a key.


The clustering index used has the same value as the clustering field it is indexing.


Sparse Index.

Single level ordered index - Secondary Indexes

A secondary means of accessing a file for which a primary access already exists.


For out of order files or for attributes which are not the ordering field.


Key field is a unique value.


Dense Index.

System Log File

File maintained on disk of all changes to a database.

System Log Checkpoints

The point at which a record is written into the log when the system writes all modified buffers to the database on the disk.


-Suspends execution of transactions.


-'Force-writes' the contents of the buffers to the disk.


-Writes a Checkpoints record to the log and 'force-writes' the log to the disk


-Resumes transactions

Steal/No Steal

In the event of a failure a Steal recovery process allows writing an updated buffer to disk before the transaction commits.


No steal means that an UNDO action will never be needed during recovery.

Force/No Force

The force mechanism means that all pages updated by a transaction are immediately written to disk when the transaction commits.

Steal/No-Force

Updated buffers are written to the disk before the transaction commits.

Finding the candidate keys

Find the set of attributes not on the RHS of any FD. Every candidate key must contain these attributes.