L2 ERD Flashcards

1
Q

What is a ISA relationship?

A

I Also known as generalisation/specialisation.

When an entity type contains certain entities that have special properties not shared by all entities, this suggests two entity types should be created with an ISA relationship type between them.

I E.g. An Employee ISA Person and a Student ISA Person I If Employee ISA Person then Employee inherits all the attributes of Person.

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

What is a composite key?

A

composite keys are keys having more than one attribute, such as {Department, University} and {Name, Address}

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

What is meant by a cyclic relationship type, including the part played by roles in the relationship type?

A
  • a relationship type between two occurrences of the same entity type.
  • Examples:
    • Marriage between Person and itself.
    • Parent-Child between Person and itself.
    • Part-Sub-Part between Part and itself.
  • With each entity type in a cyclic relationship type we associate a role, represented by labels on lines in an ERD.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is The Entity Relationship Model?

A

An example of a conceptual (high-level) data model
I Useful for design before moving to a lower level
model (e.g. relational)

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

What are alternatives to ERD?

A
UML (Unified Modelling Language) and
I ODL (Object Description Language)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the main parts of ERD

A

Structural part

  • entity types
  • attributes
  • relationship types

Integrity constraints

  • primary keys for entity types and relationship types,and
  • multiplicity (cardinality) constraints for relationship types
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the main advantages of the ERD?

A

The diagrams (ERDs) associated with entity-relationship models

  • are relatively simple
  • are user-friendly
  • can provide a unified view of data, which is independent of any implemented data model
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is an entity?

A

An entity is a “thing” that exists and can be uniquely
identified, e.g., an individual person.

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

What are entity types?

A
  • An entity type (or entity set) is a collection of similar entities, e.g., a collection of people.
  • An entity type
    • is similar to a class in object-oriented languages
    • has associated attributes, which represent properties of the entities comprising the entity type
    • is represented in an ERD by a rectangle
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are attributes?

A
  • properties ofentity types.
  • Each attribute usually has only simple values (e.g. integers or character strings)
  • represented by an oval in an ERD, with a line to the rectangle representing its entity type
  • Sometimes multi-valued attributes (e.g. Phones) are allowe represented by a double oval in an ERD
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the Domain?

A

The domain of an attribute of an entity type is the set of
constant values associated with that attribute.

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

What is a relationship type?

A

A relationship type is an association between two or more
entity types.

Relationship types are represented in an ERD by diamond shapes, with lines to each of the rectangles representing entity types involved in the association

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

What are Relationships?

A

A relationship is an instance of a relationship type, i.e., it is the set of associations between the entities comprising the entity types associated by the relationship type.

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

Which types of Multiplicity / Cardinality exist?

A
  • many-to-one (or one-to-many)
    • An Employee Works in one Department or a Department has many Employees.
  • one-to-one
    • A Manager Heads one Department and vice versa.
  • many-to-many
    • A Lecturer Teaches many Students and a Student is Taught by many Lecturers.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which Participation Constraints exist?

A

optional relationship
I e.g., an Employee may or may not be assigned to a
Department
I Participation of entity (e.g., Employee) in relationship
is said to be partial
I This is the default for relationships in our notation
I (Sometimes indicated by cardinality constraint of 0..*)
I mandatory relationship
I e.g., every Course must be Taught by at least one
Lecturer
I Participation of entity (e.g., Course) in relationship
said to be total
I Indicated by double lines in our notation
I (Sometimes indicated by cardinality constraint of 1..*)

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

What is a weak entity type?

A

Definition. A Weak Entity Type is an entity type that does
not have sufficient attributes to form a primary key.

I The existence of a weak entity depends on the
existence of an identifying or owner entity type.

I The relationship between them is called an
identifying (ID) relationship.

I The weak entity type must have a discriminator (one
or more attributes) for distinguishing among its
entities.

17
Q

How does one construct an ERD?

A
  1. Identify the entity types (including weak entity types) of the application.
  2. Identify the relationship (including ISA and ID) types.
  3. Classify each relationship type identified in step 2 according to its multiplicity, i.e. if it is a one-to-one, many-to-one or many-to-many.
  4. Determine the participation constraints for each entity type in each relationship type.
  5. Draw an ERD with the entity types and the relationship types between them.
  6. Identify the attributes of entity and relationship types and their underlying domains
  7. Identify a primary key for each entity type.
  8. Add the attributes and primary keys to the ERD drawn in step 5.