Chapter 3: ER and EER Models Flashcards

1
Q

What are the three building blocks of an Entity Relationship Model?

A

Entity Types, Attribute Types, and Relationship Types

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

What does ER Model stand for?

A

Entity Relationship Model

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

What is an Entity Type?

A

An entity type is a “thing”, a noun, something that has an unambiguous meaning. Examples include supplier, customer, product, student, etc.

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

What is the difference between Entity Type and Entity?

A

An Entity Type is the heading of the table, basically what type of thing (entity) it will contain (ex. Student). An entity is an instance in that table (ex. John Smith)

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

How is Entity Type depicted in an ER model?

A

Using a rectangle

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

What is an Attribute Type?

A

An attribute type is a property of an entity, it is something about the “thing”. Examples for “Customer” include name, address, customerID, status

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

How is an Attribute Type depicted in an ER model?

A

Using an ellipses

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

What is a Domain?

A

A Data Domain refers to all the valid values which a data element (column) may contain. You can’t represent domain using an ER model (Ex. gender may only be male or female)

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

What is a Key Attribute Type?

A

A Key Attribute Type is used to denote the property that uniquely identifies an entity (customerID), and which is mapped to the Primary Key field in a database

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

What is the difference between a Simple and Composite Attribute Type?

A

A Simple Attribute Type cannot be further divided into parts. Examples include supplier numbers or supplier status.

A Composite Attribute Type is one which can be broken down into sup-parts. Examples include address being broken down further into street, number, city, postal code, country, etc.

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

What is the difference between Single-Valued and Multi-Valued Attribute Types and how are they depicted in an ER model?

A

A Single-Valued Attribute Type is one that can only have one value, for example, supplierID. A Multi-Valued Attribute Type is one that can have multiple values, for example, multiple email addresses for one supplier.

A Multi-Valued Attribute Type is depicted using a double ellipses

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

What is a Derived Attribute?

A

A Derived Attribute is one that is derived from another attribute. An example is Age being derived using the difference between the attribute type Date of Birth and the current date

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

How is a Relationship Type depicted in an ER model?

A

Using a rhombus shape (diamond)

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

What is the Degree of a relationship type?

A

A Degree is the number of entity types participating in the relationship type

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

What is Cardinality of relationship types?

A

Cardinality specifies the minimum or maximum number of relationship instances that an individual entity can participate in

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

What are the Minimum Cardinalities and what do they mean?

A

Can either be 0 or 1.

0 means that the entity can occur without being connected through a relationship to another entity

1 means that the entity must always be connected through a relationship to another entity

17
Q

What are the Maximum Cardinalities and what do they mean?

A

Can either be 1 or N.

1 means the entity can only be in a relationship with one other entity

N means the entity can be in a relationship with N entities at once

18
Q

What does 1:1 mean?

A

Entity A can only be assigned to at most one other entity (a student can have no thesis or one thesis), and Entity B can only be assigned to at most one other entity (a thesis can have no student or one student)

19
Q

What does 1:N mean?

A

Entity A can only be assigned to at most one other entity (a project must and can only be managed by one person), but Entity B can be assigned to many other entities at once (a person can manage zero or many projects)

20
Q

What does N:1 mean?

A

Entity A can be assigned to many other entities at once, but Entity B can only be assigned to at most one other entity

21
Q

What does N:M mean?

A

Entity A can be assigned to many entities at once, N, and Entity B can also have many Entities assigned to it, M. An example is that a student can have many or no classes and a class can have many or no students in it

22
Q

What is a Strong Entity Type?

A

A strong entity is complete by itself and is not dependent on any other entity type. It possess a primary key which describes each instance in the strong entity set uniquely

23
Q

What is a Weak Entity Type? Describe an example.

A

A Weak Entity is an entity that cannot be uniquely identified by its attributes alone; therefore, it must use a foreign key in conjunction with its attributes to create a primary key

An Example is rooms at a hotel. Entity type “room” cannot be uniquely identified using room number, since all hotels have a room #1, so you must use the hotel number pulled from entity “hotel” as an attribute, making “room” a weak entity

24
Q

How is a Weak Entity depicted in an ER model? How are borrowed attributes depicted?

A

A double-lined rectangle for Weak Entity

Dashed underline for borrowed attributes

25
Q

What is a Ternary Relationship Type?

A

A Ternary Relationship Type is a relationship type where there are more than two entities engaging in the relationship

26
Q

What is a limitation of the ER model?

A
  • Temporal constraints cannot be enforced (Ex. after two months, … happens)
  • Business rules cannot be enforced (Ex. employees can only work on projects undertaken by the department they are in)
  • Domains cannot be set or enforced (Ex. hours worked must be a positive value)
27
Q

What is the difference between an ER Model and an EER Model?

A

An EER Model is just an ER Model containing semantic data modeling concepts, which are specialization/generalization, categorization, and aggregation

28
Q

What are the three extensions to the ER Model that the EER Model provides?

A

Specialization/Generalization
Categorization
Aggregation

29
Q

What is Specialization?

A

Specialization refers to the process of defining a set of subclasses of an entity type. These are formed using distinguishing characteristics of entities in a superclass

Think of it like specializing your business degree. You are part of the business student superclass, but then can specialize into finance, marketing, and supply chain

30
Q

What is Generalization?

A

The reverse of specialization, taking subclasses and grouping them into a superclass

For example, there are finance, marketing, and supply chain students, but they can all be considered as business students

31
Q

What is Disjoint Specialization?

A

Disjoint Specialization is when an entity can be a member of at most one subclass at a time. A finance student cannot be a supply chain student

32
Q

What is an Overlap Specialization?

A

Overlap Specialization is when an entity can be a member of more than one subclass at a time. A university student may be both a business and economics major

33
Q

What is Total Specialization?

A

Total Specialization is when every entity in the superclass must be a member of a subclass. Every university student must have a major

34
Q

What is Partial Specialization?

A

Partial Specialization allows an entity to be either part of a subclass or not part of a subclass. You can be a university student but not have a minor

35
Q

What are D.O.T.P specializations? Explain each.

A

Disjoint Specialization
Overlap Specialization
Total Specialization
Partial Specialization

36
Q

What is Categorization? How is it represented in an EER diagram?

A

Categorization is a subclass that has several possible superclasses. For example, a person (superclass) and a company (superclass) may be of the subclass account holders

37
Q

What is Total Categorization and Partial Categorization?

A

Total Categorization is when all entities of a superclass belong to a subclass. Partial Categorization is when not all entities of a superclass belong to the subclass

For example, not all companies and people are account holders

38
Q

What is Aggregation? Give an example.

A

Aggregation is when entity types are related by a particular relationship and are aggregated into a higher-level entity type that has a relationship with other entity types

An example is the entity types “project” and “employee”, which have a “works for” relationship, which can be aggregated and then related to a required machinery