Week 3 Notes Flashcards

1
Q

Redundancy causes three kinds of anomolies

A

update, insertion, and deletion

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

Redundancy (redundant storage) stores the same data repeatedly

A

problem: requires more storage and more labor enter the data

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

update anomaly

A

if you change one relational variable in one area, you must change the redundant data everywhere it is stored or data will be inconsistent

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

deletion anomaly

A

you lose the last copy of some data when you delete other data

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

insertion anomaly

A

you cannot insert some data without inserting other data that may not be applicable

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

normalization of a relational database

A

process of developing tables, columns, and the dependencies of columns upon one another so they satisfy the normalization rules

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

each rule builds upon previous ones

A

a database is in the third normal form if it satisfies the first three rules

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

goals of normalization (similar to advantages of a relational database)

A

minimize redundant data, reducing inconsistent data, avoiding insert/ delete/ and update anomalies, and reducing maintenance

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

requirements for a table to be relational

A
  • each table has a unique name for an owner in the database
  • each column has a unique name, data type, and a domain
  • each row in the table has a unique combo of values (data integrity)/ or primary key with a unique combo of values
  • order of rows and columns is arbitrary
  • the value at each row/column is atomic
  • NO repeating columns of similar data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

dependencies that cause redundancies

A
  • NO repeating columns of similar data = first normal form (1NF)
  • NO partial dependencies = (2NF)
  • NO transitive dependencies = 3NF
  • NO non-key attributes determine the part of the key = boyce/ codd normal form (BCNF)
  • NO non-trivial multi-valued dependencies = 4NF
  • NO join dependencies = 5NF
  • NO remaining dependencies = domain/ key normal form (DKNF)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

candidate key

A

minimal set of attributes which can uniquely identify a tuple
- value unique and not null for every tuple
- there can be more than one candidate key in a relation

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

super key

A

set of attributes which can uniquely identify a tuple
- adding zero or more attributes to candidate key generates super key
- candidate is super key but vice versa not true

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

alternate key

A

candidate key other than the primary key

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

surrogate keys

A

artificial key which uniquely identifies each record
- generated right before a record is inserted into a table

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

Normalization rule 1

A

no repeating groups with similar info appear in a table
- procedure: identify the repeating group, remove the repeating group, and move the repeating group into a new table (w copy of column that identifies that group)

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

normalization rule 2

A

all non-primary-key columns depend on all parts of the primary key

17
Q

normalization rule 3

A

all non-primary columns depend only on the primary key

18
Q

boyce-codd normal form (BCNF)

A

table can be in 3NF, but not BCNF
- requirements: 3NF form & for any dependencies, A -> B, A should be a super key

19
Q

4NF

A

BCNF form and does not have multi-valued dependency

20
Q

higher levels of normalization vs query performance

A

common to violate normalization rules to improve performance or convenience
- typically design is in 3NF

21
Q

denormalization from 3NF to 2NF only if

A
  • performance with realistic test data is unsatisfactory
  • performance cannot be made satisfactory with hardware improvements
  • performances cannot be made satisfactory by software improvements
  • database designer and builder understand tradeoff (improved performance v losses)
22
Q

data dictionary

A

table within a database that lists metadata for all the tables within the database (also may include constraints)
- can also be used as planning tool by database engineer

23
Q

system catalog

A

data dictionary may be derived from SC.
- detailed system-created database whose tables store database characteristics
can describe all objects in the database
sometimes, SC is the DD

24
Q

retrieving or selecting data affects neither raw or metadata stored but

A

may change format or values displayed (if data is manipulated)