L20 - Logical Design Flashcards

1
Q

What is database design?

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

What is the top down approach?

A
  1. Conceptual database design
  2. Logical database design
  3. Physical database design
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the steps for conceptual phase?

A
  • Constructing a model of data
  • Used in org independent of all physical considerations
  • Primarily done through building an ER model
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What steps are involved when creating a ER model?

A
  1. Identify entities
  2. Identify Relationships
  3. Identify and associate attributes with entities or relationships
  4. Determine attribute domains
  5. Determine candidate, primary and alternate key attributes with entities or relationships
  6. (Optional) specialise/generalise entities
  7. Check model for redundancy
  8. Check model supports user transactions
  9. Review conceptual database design
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Explain realationship degrees

A
  • Number of participating entities
    • Binary = 2 (most common)
    • Ternary - three entities involved
    • N-ary - >4 entities involved
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is logical database design?

A
  • Process of constructing a model of data used in an organisation based on a specific data model
  • But independent of a particular DBMS
    • And other physical considerations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the logical database design objective?

A
  • To create tables based on
  • The ER model
  • To check that these tables are both
    • Well-structured
    • Support the required transactions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the steps involved in logical database design?

A
  1. Create tables
  2. Normalise table structure
  3. Check user transactions support for tables
  4. Check integrity constraints
  5. Review the LDD with users
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you represent entities?

A
  • Create a table for each entity in the ER model
  • List only simple attributes
  • Break down composite attributes
  • Identify primary key
  • Identify alternate candidate key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is an alternate way of representing entities?

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

What is the general way to represnet realtionships between entities?

A
  • Completed through the use of primary and foreign keys
    • Includes parent and child entities
  • Type of relationship depends on
    • The degree - unary, binary,complex
    • Participation contraints
    • Single or multi-valued
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How does 1:1 realttionships work

A

1:1 Binary Relationships

  • Differentiation of parent child is harder due to
    • Both sides having equal cardinality
  • Therefore participation is used (lower values in multiplicity ranges) to decide
    • To merge entities into single table
    • Create separate tables related by foreign keys
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How does mandatory participation on BOTH sides of a 1:1 relationship work?

A
  • Entities combined into single table
  • 1 primary key retains primary key
  • 1 primary key converts into alternate key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How does Mandatory Participation of ONE side of a 1:1 relationship work?

A
  • Parent entity has the optional participation
    • Parent = 0..1
  • Child has the mandatory participation
  • Child primary key used as foreign key in parent entity
    • Child = 1..1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How does Optional Participation on BOTH sides of the 1:1 relationship work?

A
  • Both parent and child have optional participation
    • 0..1
  • Where the child now takes the parents primary key
    • As an foreign key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How does 1:* unary relationships work?

A
  • AKA one to many recursive relationships
  • Same entity is parent and child
  • Foreign key needed to represent the relationship
    • Through copying the primary key
    • Creating a second column to act as a foreign key
17
Q

How does 1:1 recursive relationships work?

A
  • Mandatory participation on both sides
    • Single table
    • Two copies of PK
    • Renamed to describe the relationship
  • Mandatory participation on one side
    • Single table
    • Create new table
      • To rep instances of the relationship
      • Where both PK are FK (needs to be renamed)
  • Optional participation on both sides
    • Create new table
      • To rep instances of the relationship
      • Where both PK are FK (needs to be renamed)