lesson 4 database Flashcards

1
Q

What is
essential to a
good database
design?

A

Reduces redundancy
Provides access
Ensures data accuracy and integrity
Accommodates your data processing
and reporting needs

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

In a __________
relationship,
only one row of
a table is linked
to at most one
row on the
other table.

A

one-to-one

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

one row of one
table can link to many rows in a table.

A

One to Many

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

one or more
rows of one table can link to 0, 1 or many rows
in the other table. To implement this
relationship, we must use
a mapping or intermediary or junction table.

A

Many to Many

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

A table follows first normal form if for every row and column
intersection (a cell in a table) in the table, there exists a single value
and never a list of values. This is known as the atomic rule. Use the
one-to-many relationship to follow _____

A

First Normal Form (1NF)

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

A table follows second
normal form if it is 1NF
and every non-key column
is fully dependent on the
primary key. This also
applies when a primary key
has multiple columns, every
non-key column should still
depend on the entire set
and not part of it.

A

Second
Normal Form
(2NF)

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

if it is 2NF
and the non-key columns
are independent of each
other.

A

Third
Normal Form
(3NF)

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

The primary key cannot
contain NULL! Otherwise, it cannot uniquely identify
the row. This includes for multiple column’d primary
keys as well, none of the columns can be NULL.

A

Entity Integrity Rule

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

Each foreign key value
must be matched to a primary key value in the table
referenced (or parent table). In turn, this means that
you can only insert a row with a foreign key in the
child table only if that value (of the foreign key)
exists in the parent table. If the value of the key
changes in the parent table, all rows in the child
table(s) should also change the value of the foreign
key referring to the parent table. This can be handled
by either not allowing change, cascading the change,
or set the key value in the child tables to NULL.

A

Referential Integrity Rule

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

These are validation rules
to ensure for correct values (5 digit zip codes,
validating credit card number, etc).

A

Business logic integrity

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