ERD Flashcards

1
Q

What is an Entity Relationship Diagram (ERD)?

A

An expressive and powerful tool that helps to capture the organization of data within a system into entities, and the realtions among them.

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

What is a graphical representation of Entities and their relationships?

A

Entity Relationship Diagram

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

What can anything that is a source of related data considered?

A

An entity

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

What type of process is drawing an ERD?

A

Iterative (a process for calculating a desired result by means of a repeated cycle of operations.)

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

How is an entity in an ERD represented?

A

An Entity name in uppercase inside a box

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

What do the name and box of an entity represent?

A

A complete class of simlitar entities.

For example, an entity called “employee” doesn’t represent a particular employee in the business, but represents all employees in the business.

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

What do entities ultimately become?

A

A file, inside each file will be a record for each employee the business has.

For an entity named Employee.

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

What is each “record” kept with in an entity called?

A

An entity instance.

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

What is an entity a collection of?

A

Entity Instances

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

What are the fields housed in entity instances called?

A

Entity attributes

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

What type of entity is defined more or less completely by the data that it holds?

A

A Strong Entity

Example: Employee, Student, Vehicle, Patient, Manager etc.

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

What is an entity that depends on other entities to be completely defined?

A

A weak entity

Examples: An entity like dependents that is reliant on an employee entity first.

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

What is an entity that describes relations?

A

An associative entity

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

What are fields of data that we gather from an entity?

A

An attribute

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

What does an attribute contain?

A

The actual pieces of data that are being stored in the database.

Examples are names, addressess, ages, quantities etc.

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

What is an attribute that unequivocally identifies an individual entity?

A

An Identifier attribute.

Examples: SSN for individuals, Student IDs for students etc.

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

How are identifier attributes indicated in an ERD?

A

By underlining their name

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

What are attributes that identify individual entity instances within a weak entity?

A

Partial Idenifier attributes

Examples: SSN of an employee’s dependent.

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

How are partial identifiers indicated in an ERD?

A

By double underlining their name

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

Which attribute is an attribute whose contents can be calculated or obtained by applying an algorithm to other fields in the database?

A

A Derived attribute.

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

How is a derived attribute indicated in an ERD?

A

By surrounding the name with [].

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

What is an attribute that only holds one independent value at a time?

A

Single value attribute.

Example: In the employee-dependent example: in each record for a dependent only one dependent is recorded.

24
Q

How are single value attributes annotated in an ERD?

A

No special annotation.

25
Q

What type of attribute can store various contents in one field?

A

A multivalued attribute.

Example: Instead of having seperate employee/dependent entities, the employee entity can have an attribute called dependents. Therefore, storing them in the same field.

26
Q

What type of attribute can be incorporated into an ERD, but eliminated later in design?

A

Multivalued.

27
Q

What does it mean to make fields in a database atomic?

A

That every field should contain the smallest piece of information that is appropriate for the system.

28
Q

How are multivalued attributes indicated in an ERD?

A

By surrounding their names with {}.

29
Q

What type of attribute is created when you break large attributes into smaller unbreakable ones?

A

Composite Attributes.

30
Q

How do composite attributes work?

A

They contain data in it’s own right, but when combined with other attributes in an entity produce new attributes with more powerful meanings.

Example: An address can be broken up into, street number, street name, city, zip-code, country.

31
Q

How are composite attributed indicated in an ERD?

A

By giving a name fo rthe composite attribute followed by the names of the individual attributes that make the composite up, all seperated by commas and surrounded by parentheses.

32
Q

What is the purpose of an ERD?

A

To express the data itself and its relations.

33
Q

Entity example and proper annotations for types

A
34
Q

What is any interaction between entities that needs to be recorded as a source of data?

A

A relationship

Example: A physician entity examines a patient entity

35
Q
A
36
Q

How many ways can a relationship be expressed?

A

Each relationship has two sides and can be expressed in two different ways.

37
Q

How are relationships represented in an ERD?

A

With a solid line that connects the entities participating in the relationship and the name of the relationship.

Example:

38
Q

What are the individual relations between entity instanced called?

A

Relationship instance

39
Q

What kind of relationship has a different line?

A

Dependency relationship, it use two lines instead of one

Example: A weak entity connected to a strong entity. Employee and dependent entities from earlier

40
Q

What two attributes define every relationship?

A

Their degree and cardinality

41
Q

What is the number of entities involved in a relationship called?

A

The degree of the relationship

42
Q

What are the three types of relationships?

A

Unary, Binary, Ternary

43
Q

What relationships involve one entity?

A

Unary

These are relations of an entity with itself

44
Q

What relationship involves two entities?

A

Binary

The most common, just one entity connect to another entity

45
Q

What relationship involves three entities

A

Ternary

These usually appear when there is an activity where three entities take an action that cannot be done if one of them is missing.

Example:

For example, a parcel delivery company may have parcels to deliver to certain clients. If the company wants to keep track of which delivery person delivered which packet to which client, three entities are involved: DeliveryPerson, Parcel, and Client. If we eliminate either of them from the relationship, the information about the delivery will not be complete.

46
Q

What is the number of entity instances involved at each side of a relationship instance?

A

The cardinality of a relationship

Example: One-to-One, One-to-Many etc.

47
Q

How are cardinalities indicated?

A

By two numbers, the minimum and maximum cardinality (m,M) for the minimum and maximum number of instances of an entity involved in a relationship.

48
Q

Where are the numbers indicated an entities cardinality usually added?

A

On the side close to the netity they describe within the line representing the relationship.

Example: A pair like (1,1) indicates that one and only one instance of this entity instand shoudl be part of any relationship instance. (1,M) indicates one or more, and (0,1) or (0,M) indicate optional since there could be zero instances of the entity in the relationship.

49
Q

Examples of cardinatily graphically

A

(1,1) can be replaced with two small lines

(0,1) can be replaced with a circle and a line next to it

(1,M) can be replaced with a small line and a crows foot

(0,M) can be replaced with a small circle and a crows foot

50
Q

What are the two important categories of relationships?

A

One-to-One

One-to-Many

51
Q

What is a one-to-one relationship?

A

One entity instance in one side of the relationship is related to only one entity instance in the other side of the relationship.

Example: A police officer is assigned a partner, each side only has one connection. Also a unary relationship

52
Q

What is a one-to-many relationship?

A

There is one entity instance in one sid eof a relationship that holds the same type of relation with many entity instances in the other side of the relationship

Example: A teach is assigned a set of students. Each student only has one teacher, but the teacher has many students.

53
Q

What is a many-to-many relationship?

A

Where more than one instance entity in one side of the relationship match some number of instance entities in the other side that is bigger than one.

54
Q

What is an entity that is created when relationships themselve have attributes?

A

Associative entity

55
Q

What does an associative entity contain?

A

All required attributes for the relationship, and each one of the other previous entities will replace their direct relation with each other for a direct relationship with the associative entity.

56
Q

Associative entity example:

A
57
Q

To avoid problems creating databases later, what should be eliminated if possible?

A

Many-to-Many relationships. They should be converted to one to many relationships using associative entities if possible.

Example attached: