CIS Exam 2

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/55

encourage image

There's no tags or description

Looks like no tags are added yet.

56 Terms

1
New cards

union

an element appears as the sum of the number of times it appears in each bag

tuple t appears n+m times

2
New cards

intersection

an element appers as the minimum of the number of times it appears in either

tuple t appears min(n,m) times

3
New cards

difference

tuples t appears max(0, n-m) times

4
New cards

elimination operator

R1 consists of one copy of each tuple that appears in R2 one or more times

turns into a set

5
New cards

sorting operator

R1 is the list of tuples of R2 sorted first on the value of the first attribute

breaks ties arbitrarily

becomes a sorted list not a relation

6
New cards

grouping operator

Group R according to all grouping attributes

within each group, compute agg(A) for each aggregation in list L

results as one tuple for each group

7
New cards

1

true

8
New cards

0

false

9
New cards

.5

unknown

10
New cards

in

true IFF the tuple is a member of the relation produced by the subquery

11
New cards

exists

true IFF the subquery result is not empty

12
New cards

any

boolean condition that is true IFF X equals at least one tuple in the subquery results

13
New cards

all

true IFF for every tuple t, in the relation X, it is not equal to t

14
New cards

aggregations

nulls ignored

gets a single value

15
New cards

inserting a tuple

insert into <relation> (attributes)

values()

16
New cards

inserting many tuples

insert into <relation>

(<subquery>)

17
New cards

functional dependency

if 2 tuples in R agree on attributes A1, A2 then they must agree on B1, B2

18
New cards

key

{A1, A2} functionally determines all other attributes of R(A1, A2, unique)

19
New cards

candidate key

no proper subset of {A1, A2} functionally determines all other attributes of R(A1, A2, … is minimal)

no attributes can be removed without losing the ability to uniquely identify a record (it is a minimal superkey). [1, 2, 3]

20
New cards

superkey

superset of keys (carries key and any other attributes)

may not be minimal

21
New cards

transitivity

if X→Y and Y→Z then X→Z

22
New cards

augmentation

if X→Y then XZ→YZ for any Z

23
New cards

equivalency

the set of relation instances satisfying S is the exact same as the set of relation instances satisfying T

24
New cards

trivial

the left side is a subset of the right side

25
New cards

closure test

look for FD’s on the left side X that is a subset of the current Y+

if the FD is X→A add it to Y+

26
New cards

minimal basis

all FDs have singleton right sides

if any FD is removed, the result is not longer a basis

if for any FD we remove one or more attributes from the left side, the result is not longer a basis

27
New cards

first normal form

atomic values- each cell must contain a single value

no repeating groups

uniqueness of records

28
New cards

second normal form

no partial dependency- all nonkey attributes must depend on the entire key, not just part of it

applies to just composite primary keys

X→Y where X is a full key and Y is nonkey

29
New cards

third normal form

no transitive dependencies- a nonkey attribute should not depend on another nonkey

X→Y where X is a key and Y is a nonkey

30
New cards

Boyce codd normal form

for every nontrivial FD X→A, X is a superkey

nontrivial- A is not a member of set X

superkey- any superset of a key

31
New cards

3NF vs BCNF

3NF allows a relation to have nonprime attributes dependent on a candidate key as long as the nonprime attribute is not transitively dependent on a nonkey attribute


32
New cards

properties of decomposition

recovery and dependency preservation

33
New cards

recovery

it should be possible to project the original relations onto the decomposed schema, and then reconstruct the original data

34
New cards

dependency preservation

it should be possible to check in the projected relations whether all the FDs given are satisfied

35
New cards

BCNF

satisfy recovery

cannot always satisfy recovery and dependency preservation

36
New cards

3NF

can satisfy recovery and dependency preservation

37
New cards

atomicity

all or nothing fashion (at transaction level)

38
New cards

consistency

constraints applied before and after running transactions

each client, each transaction

  • can assume all constraints hold when a transaction begins

  • must guarantee all constraints hold when a transaction ends


39
New cards

isolation

serialized

concurrent access but final behavior is in some serial order

use locking mechanism

40
New cards

durability

transactions that committed changes only

at system level

system initiated or client initiated

41
New cards

dirty read

a data item written by uncommitted transactions

42
New cards

phantom tuples

tuples that emerge during execution

43
New cards

serializability

most consistent

decreased performance

less concurrency

44
New cards

read uncommitted

allows for dirty read

wont ensure global serialization

non-repeatable read and phantom tuples

45
New cards

read committed

dont allow for dirty read

wont ensure global serialization

non-repeatable read and phantom tuples

46
New cards

repeatable read

dont allow for dirty read

wont ensure global serialization

same read items cannot change values (no non-repeatable read)

yes phantom tuples

47
New cards

committed

system saved changes, transaction was processed

48
New cards

uncommitted

system was interrupted with rollback to last committed transaction

49
New cards

0

count(all Null values)

50
New cards

count(*)

nulls included- how many tuples in the relation

51
New cards

delete

1) mark all tuples for which WHERE condition is satisfied

2) delete marked tuples

52
New cards

> ANY


> minimum value

53
New cards

< ANY

< maximum value

54
New cards

> ALL

> maximum value


55
New cards

< ALL

< minimum value

56
New cards

transaction

a group of sql statements that are treated as a unit and executed in isolation