Lecture 6 Flashcards

1
Q

How to draw a high-level database model?

A
  1. Draw diagram, as starting point for you relational database, DO NOT start with FDs, normal forms and decompositions. Instead start with objects like Customers, Invoices and Orders.
  2. Convert diagram to version 1 of you relation schemas
  3. Apply database-design theory to normalize schemas.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does ER stand for?

A

Entity/Relationship model

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

What does ES stand for?

A

Entity Sets

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

What is the definition for a key in an ES?

A

A set K of one or more attributes s.t., given two distinct entities e1 in A and e2 in E, they cannot have identical values for each attribute in key K

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

What are the requirements of keys in ES?

A
  1. Every ES must have a key
  2. There can be multiple keys for an ES
  3. When ES is in isa-hierarchy, root ES is required to have all attributes needed for a key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does an arrow with and without referential integrity look like?

A

With thin, without fat.

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

What is referential integrity?

A

A value appearing in one context, to appear as well in another context.

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

What is the definition of a weak entity set?

A

An ES with key composed of some attributes belonging to other ES(s)

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

Why do weak ESs typically arise?

A
  1. Weak ES is part of hierarchy, not of the isa type

2. Weak ES is a connecting ES (to replace multiway relationship), don’t have a key.

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

What follows from a weak ES?

A

If E is a weak ES, then its key consist of:

  • Zero or more of its own attributes, and
  • key attributes from ESs that are reached by ‘specific’ many-one relationships R from E to other ESs.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is relationship R, that makes ES F ‘contribute’ to key of weak ES E called?

A

A supporting relationship

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

How to convert an ER diagram to relation schema?

A
  1. Turn each ES into relation with same attributes as ES

2. Replace relationship by relation, with keys from connected ESs as attributes

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

What are the 3 approaches to convert subclass structures?

A
  1. Follow ER viewpoint, for each ES E in hierarchy, create a relation
  2. Treat entities as object belonging to only a single class: for each possible subtree including the root, create on relation
  3. Use null values: one big relation with all attributes of all ESs in hierarchy.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly