Quiz 3 Flashcards

1
Q

During which phase of the SDLC is the E-R model developed?

A
  • E-R model developed during Analysis phase
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

During which phase of the SDLC is the logical data model model developed?

A
  • Logical data model (Relations) developed during Design phase
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the steps to transform E-R Diagram into Relations?

A
  1. Represent entities
  2. Represent relationships
  3. Normalize if necessary
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you build the logical data structure to represent a Unary 1:1 relationship?

A
  • Add a foreign key that references the primary key values of the entity
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you build the logical data structure to represent a Unary 1:N relationship?

A
  • Add a foreign key that references the primary key values of the entity on the “one” side
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you build the logical data structure to represent a Unary M:N relationship?

A
  • Modeled as a separate relation
  • Primary key of new relation is a composite key of two attributes that both take their values from the same primary key of the entity
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you build the logical data structure to represent a Binary 1:1 relationship?

A
  • Add the primary key of A as a foreign key of B
  • Add the primary key of B as a foreign key of A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you build the logical data structure to represent a Binary 1:N relationship?

A
  • Add the primary key of the entity on the “one’ side of the relationship as a foreign key in the relation on the many side of the relationship
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you build the logical data structure to represent a Binary M:N relationship?

A
  • Create an associative entity (intersection table)
  • Create another relation and include primary keys of all relations as primary key of new relation as well as attributes of the relationship
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you build the logical data structure to represent a Ternary relationship?

A
  • Create an associative entity (intersection table)
  • Create another relation and include primary keys of all relations as primary key of new relation as well as attributes of the relationship
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the requirements to be normalized to 1NF?

A
  • All column values must be atomic (i.e., indivisible)
  • NO multivalued or composite attributes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the requirements to be normalized to 2NF?

A
  • 1NF +
  • every non-key column is fully dependent on the entire (composite) primary key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the requirements to be normalized to 3NF?

A
  • 2NF +
  • all non-key columns are mutually independent

AKA:

  • no transitive dependency is allowed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the concerns of the physical data model?

A
  • Databases
  • Data types
  • Integrity constraints
  • Optimization
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Name some database software

A
  • Oracle
  • MS SQL Server
  • MS Access
  • MySQL (now owned by Oracle)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a data type?

A
  • a classification identifying one of various types of data, such as
    • real
    • integer
    • Boolean
  • determines the possible values for that type
  • determines operations that can be done on values of that type
  • meaning of the data
  • way values of that type can be stored
17
Q

What are integrity constraints?

A
  • Referential Integrity
  • Default value
  • Range Control
  • Null value control
18
Q

What are the major methods of database optimization?

A
  • Denormalization
  • Partitioning
  • Read/Write Splitting
19
Q

Why is data sometimes denormalized?

A
  • Speed of query vs. storage efficiency
  • Normalization can slow down queries
20
Q

What are the major types of partitioning?

A
  • Horizontal Partitioning
  • Vertical Partitioning
21
Q

What is Horizontal Partitioning?

A
  • Split a table horizontally
    • each partition contains only certain rows
  • Each partition is also called a shard
22
Q

What is Vertical Partitioning?

A
  • Split a table vertically
    • each partition contains only certain columns
23
Q

What is Read/Write Splitting?

A
  • Master for writing to
  • Replicated Slaves for reading
24
Q

What are the first three Normal Forms?

A
  1. No repeating elements or groups of elements
  2. No partial dependencies on a concatenated key
  3. No dependencies on non-key attributes