Week 3 Flashcards

1
Q

What are the different ERD components?

A
  • Entities: Corresponds to an entire table, not row and is represented by a rectangle
  • Attributes: Correspond to columns in tables and are listed in rectangle (in entity)
  • Relationships: Reflected by P.K and F.K pairs and are represented by lines among entities.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the 4 steps to creating an ERD?

A
  1. Identify entities through business rules
  2. Identify relationships among the entities
  3. Specify attributes within each entity
  4. Check/specify all the details (e.g. weak entity)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is Connectivity?

A

Connectivity describes relationship classification (e.g. 1:1, 1:M, M:N)

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

What is Cardinality?

A

Cardinality expresses the number of entity occurrences associated with one occurrence of a related entity. (e.g. one employee can be associated with a maximum of two tablets)

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

What are the two different types of relationship participation?

A
  • Optional participation: One entity occurrence does not require corresponding entity occurrence in particular relationship
  • Mandatory participation: One entity occurrence requires corresponding entity occurrence in particular relationship.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the general rules for FK: 1:1 relationships?

A

The general rules for FK in 1:1 relationships are:

  • Put the Foreign Key in the strong entity or in the most frequently accessed entity
  • Or put foreign key in the entity selected by the semantics of the problem.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the general rules for FK: 1:M relationships?

A

Create the foreign key by putting the primary key of the “1” in the table of the “M”.

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

What are the general rules for FK: M:N relationships?

A

Convert the M:N relationship to a composite (bridge) entity consisting of (at least) the parent tables’ primary keys.

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

What is a composite entity?

A

Composite entities (aka bridge tables) are used to bridge between M:N relationships. They are composed of the primary keys of each entity needing connection. Normally contains additional attributes

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

What is a primary key?

A

A primary key is an essential attribute of each entity that is unique to the record within that entity.

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

What is the difference between a simple and a composite attribute?

A

Simple attribute: Can’t be subdivided (e.g. Age, Sex, Marital Status)

Composite Attribute: Can be subdivided into additional attributes (e.g. Address into street, city, zip)

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

What is the difference between a single-valued and multivalued attribute?

A

Single-valued attribute: Can only have a single value (e.g. person can only have one social security number)

Multivalued attribute: Can have many values (e.g. Person may have several college degrees)

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

How do you handle multivalued attributes?

A

If there is a multivalued attribute there are two options:

  1. Within the original entity, create several new attributes, one for each of the original multivalued attribute’s components.
  2. Create a new entity composed of the original multivalued attribute’s components
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are derived attributes?

A

Derived attributes are attributes that can be derived with an algorithm (computation) (e.g. age can be derived from date of birth). If the derived attribute is often queried upon, keep it in the table.

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

What is existence dependancy?

A

If an entity’s existence depends on the existence of one or more other entities, it is said to be existence dependent (e.g. a CLASS is existence dependent on COURSE)

17
Q

What are the two different types of relationship strength?

A
  • Weak (non-identifying) relationships
    Exist if PK of related entity does not contain PK component of parent
  • Strong (Identifying) relationships
    Exists when PK of related entity contains PK component of parent entity
18
Q

What is a weak entity?

A

A weak entity is an entity whose existence depends on another entity and has a primary key that is partially or totally derived from parent entity. (A weak entity is connected by a strong relationship with its parents entity)

19
Q

What are the three different types of relationship degrees?

A

There are three different relationship degrees:
1. Unary: Single entity with a recursive relationship

  1. Binary: Two entities associated
  2. Ternary: Three entities associated
20
Q

What is a recursive entity?

A

A recursive entity is one in which a relationship can exist between occurrence of the same entity set. A recursive entity is found within a unary relationship.

21
Q

What is a strong entity?

A

A strong entity is an entity whose existence is not dependent on any other entity. Strong entities have their own attributes that uniquely identify them