week 10 Flashcards

1
Q

what is a candidate key?

A

A relation schema can have more than one key - these are called candidate keys

A primary key is then assigned from these candidate keys
Rest ( of candidate keys if any) are secondary keys

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

prime

A

attribute that is a member of some candidate key

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

Non prime

A

attriibrute that is a member of non- candidate keys

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

what is normalisation?

A

The process of:
n analysing relation schemas based on FDs and candidate keys to minimise
redundancy and insertion, deletion and update anomalies
n decomposing unsatisfactory relations by breaking up their attributes into
smaller relations

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

what is normal form?

A

Condition using keys and FDs of a relation to certify whether a relation schema is
in a particular normal form

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

what does normalisation help get rid of

A

erroneous tuples generated through bad join conditions( usually when fk and pk are not joined properly)
redundancy and by extension insertion , update and deletion anomalies
presence of null values

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

properties of First Normal Form (1NF)

A

Disallows:
.composite attributes (attributes that can be broken down into further attributes eg FullName)
. multi valued attributes
.nested relations; attributes whose values for an individual tuple are non-
atomic

. no repeating groups of attributes
.Each row must be unique

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

What is full functional dependency

A

Remove of any attribute from Y-> Z means the functional dependency doesn’t hold any more

eg : Examples: {SSN, PNUMBER} -> HOURS
-Full FD
-since neither SSN -> HOURS nor PNUMBER -> HOURS hold

HOWEVER

SSN, PNUMBER} -> ENAME
- It is not a full FD
-since SSN -> ENAME also holds
-partial dependency

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

2NF

A

A relation schema R is in second normal form (2NF) if
every nonprime attribute A in R is not partially
dependent on any key of R.

if primary key is single attribute , automatically 2NF

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

3NF

A

A relation schema R is in third normal form (3NF) if
n it is in 2NF and
n no non-prime attribute A in R is transitively dependent on the
primary key

n X -> Y and Y -> Z, with X as the primary key, we consider this a
problem only if Y is not a candidate key.

Essentially for all non prime attributes , either they have to be functionally dependent on primary key directly or transitively through a candidate key

if functionally dependent transistively througha non - candidate (Y is non candidate) then not in 3NF

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

more useful definition / seeing visuallt if in 3NF

A

A relation schema R is in third normal form (3NF) if whenever a FD
X -> A holds in R, then either:
(a) X is a superkey of R, OR
(b) A is a prime attribute of R

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

BCNF

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