Module 04 - Data Modeling Flashcards

1
Q

Accessing table structures

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

Count rows

A

SELECT COUNT (*)

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

Examing columns (Acessing table structures)

A

SELECT *

FROM [TABLE]

WHERE ROWNUM <=

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

Checking referential integrity constraints

A

Given two tables with an assumed foreign key constraint:

SKU_DATA (SKU, SKU_Description, Department,Buyer)

INVENTORY (WAREHOUSEID, SKU, SKU_Description ,QUANTITYONHAND, QUANTITYONORDER)

Where INVENTORY.SKU must exist in SKU_DATA.SKU

}To find any foreign key values that violate the foreign key constraint:

}

SELECT SKU

FROM INVENTORY

WHERE SKU NOT IN

(SELECT SKU

FROM SKU_DATA);

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

Normalization vs Denormalization

A

For updateable DB: Normalization

For read-only DB: Denormalization

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

Read-only databases

A

Are nonoperational databases using data extracted from operational databes.

Used on querying, reporting, and datamining applications

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

Denormalization

A

Is the joining of the data in normalized tables prior to storing the data. The data is then stored in nonnormalized data

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

Common design problems

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

Checking for NULL values

A

SELECT COUNT(*) AS QuantityNullCount

FROM ORDER_ITEM

WHERE Quantity IS NULL;

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

Multivalue problem

A

The multivalue, multicolumn problem occurs when multiple values of an attribute are stored in more than one column.

}Solution = like the 4NF solution for multivalued dependencies, use a separate table to store the multiple values.

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

Inconsistent values problem

A

Inconsistent values occur when different users, or different data sources, use slightly different forms of the same data value

Detection method:

SELECT SKU_Description, COUNT(*) AS NameCount

FROM SKU_DATA

GROUP BY SKU_Description;

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

Missing values problem

A

A missing value or null value is a value that has never been provided.

In a database table, a null value appears in upper case letters as NULL.

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

General-purpose remarks columns

A

A general-purpose remarks column is a column with a name such as:

  • Remarks
  • Comments
  • Notes

It often contains important data stored in an inconsistent, verbal, and verbose way.

  • A typical use is to store data on a customer’s interests.

Such a column may:

  • Be used inconsistentlyHold multiple data items
How well did you know this?
1
Not at all
2
3
4
5
Perfectly