Design And Implement Database Objects Flashcards

1
Q

What is the mathematical definition of a relation?

A

Requires that you have no duplicated rows

TODO: Need better definition here

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

What are the criteria for first normal form?

A
  1. All Columns must be atomic - that is, each column should represent one value
  2. All rows of the table must contain the same number of values - no arrays
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a surrogate key?

A

This is a artificial key that is normally used to provide performant uniqueness for a table row.

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

What is a natural key?

A

A unique values or unique combination of values that appear in row data that uniquely define the row.

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

What is Boyce-Codd Normal Form?

A

Every candidate key is identified, all attributes are fully dependent on a key, all columns must identify a fact about a key and nothing but a key.

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

What is second normal form

A

All attributes must be a fact about the entire primary key and not any non-primary key attributes.

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

What is third normal form?

A

All attributes must be a fact about the entire primary key and not any non-primary key attributes.

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

Would the following columns fit second normal form?

SKU (Key column 1)
Location (Key column 2)
ItemDisplayName
ItemPrice
PriceDate
A

No - this is because Item Display Name describes the SKU and is not specific to where the Item is sold.

No - because prices change over time. Either the PriceDate needs to be included in the Key or the price and price date need to be split out to another table.

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

TODO - Need a example question that differentiates between 2NF And 3NF

A

Need answer

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

What is a schema used for?

A

This is used to group together objects for security and logical ordering

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

What is Pascal-casing?

A

A naming convention what all the words are leading character capitalized and words are concatenated.

ItemPrice
PriceDate
CreateDateTime

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

What is camel casing?

A

A naming convention where the first word is all lower cases and subsequent word have the leading character uppercased. Also all words are concatenated.

itemPrice
priceDate
createDateTime

Note - this is for information purposes only. Probably won’t be on the exam.

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

What are the elements of a four part naming schema?

A

Server.Database.Schema.Object

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