Transforming ERD into Relations Flashcards

1
Q

Step 1 in Transforming ERD into Relations

A

Formally, for each entity type E in the ERD, create a relation R that includes all the attributes of E

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

Step 2 in Transforming ERD into Relations

A

Representing a relationship in a conceptual ERD to its equivalent construct in the relational logical model depends on both the degree of the relationship and its cardinality

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

Give me an in-depth explanation on step 1

A

○ Create a 2-dimensional table whose number of columns is equal to the number of attributes in your ERD

○ Give the table the name, written in capital letters, that you gave the entity in the ERD

○ Include all the names of the attributes in the table that you created

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

how to use Binary 1:N

A

Add the primary key of the entity on the one side of the relationship as the foreign key in the relation that is on the many-side of the relationship

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

This is the most common type of relationship and the easiest to represent

A

Binary 1:N

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

What is Binary 1:1/ how to use Binary 1:1

A

If two entities are maintaining a one-to-one relationship, and they can share the same primary key, these may be resolved by combining the entities into one

This means that the attribute of one entity will be moved into the other and a common primary key will be established

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

two entities are maintaining a one-to-one relationship, and they can share the same primary key, these may be resolved by combining the entities into one

A

Binary 1:1

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

Explain merging in Binary 1:1

A

Merging the two entity types and the relationship into a single relation is only appropriate when the participation of the entity types are total (an instance of one entity type ensures the existence of an instance of the other entity type) and the entity types do not participate in any other relationships.

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

when to add the primary key of A as a foreign key of B

A

If the above technique is not permissible (i.e., when at least one of the entities participates in more than one relationship)

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

If the above technique is not permissible (i.e., when at least one of the entities participates in more than one relationship), the 1:1 relationship can be represented as:

A

○ Adding the primary key of A as a foreign key of B
○ Adding the primary of B as a foreign key of A
○ Both representations

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

Representing Binary 1:1 Relationships

A

The designer is left with the discretion as to
which of the three is most appropriate.

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

Representing Binary 1:1 Relationships (the relationship has an attribute)

A

Any attributes in the relationship will be placed in the relation or table where the foreign key is placed (which is on the optional side)

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

what does Binary M:N contain?

A

Include as a foreign key, attributes in the newly created relation the primary keys of entities A and B. This combination will form the primary key of the new relation

If the relationship has any attributes, include them in the new relation

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

Create a separate relation to represent the
relationship

A

Binary M:N

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

Representing Unary 1:N Relationships

A

Represent a recursive relationship with cardinality ratio 1:N by simply adding a rename of the primary key with reference to the relationship

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

Representing Unary M:N Relationships

A

create a new relation to represent the relationship

include as a foreign key attributes, the primary
keys of the participating entity types

the primary key of the new relation is composed of its set of foreign keys