Week 3 Flashcards

(16 cards)

1
Q

What is an association?

A

It’s a relationship between tables or classes that are related to each other

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

How do you represent a relationship between tables

A

You must use PKEY and Foreign Keys in the tables

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

What is a foreign key

A

They are used to provide association between tables

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

On what side does the Foreign Key go on

A

It goes on the many side.

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

What is normalization?

A

A set of guidelines for breaking tables apart in Sub-Tables while building relationships that relate the data correctly

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

Why use normalization

A

It’s used to eliminate/reduce redundant data and reduce potential errors

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

What is denormalization? And why do it

A

It’s when you rebuild your tables into a concentrated table.

This will increase performance or make the data more readable

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

What is the 1st normal form?

A
  • Each table should have a primary key
  • No repeating groups of
    information/values within a single table
  • Each attribute has a single value
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the 3rd normal form?

A
  • Must be in 1st and 2nd normal forms
  • Remove any columns that are not dependent on the primary key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What do we usually not normalize?

A
  • Names and address information
  • Numbers
  • Dates
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is multiplicity

A

We use the name to describe the type of relationships between tables

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

What are the three types of relationships in a table

A
  • One to Many
  • Many to Many
  • One to One
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does a many to many relationship require

A

A join/junction table

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

What does a junction table typically contain?

A
  • One primary key
  • Two foreign Keys
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

When would you use a one to one relationship

A

Let’s say you’re a frequent flyer. You get a frequent flyer number associated to you. This number is unique and you may only have one

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

What is referential integrity?

A

It only allows existing data in the foreign key values to be presented in a table.