Week 7 - Entity-Relationship Modelling Flashcards

1
Q

What is a weak entity?

A

An entity that depends on another entity (owner entity) for its identity.

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

How is the primary key of a weak entity formed?

A

It combines the primary key of the owner entity with some additional attributes.

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

Give an example of a weak entity relationship.

A

A “Copy” entity dependent on a “Book” entity, or a “Borrower” entity dependent on a “Member” entity.

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

What attributes form the primary key for the weak entity “Copy”?

A

book id (primary key of the owner entity “Book”) and copy num.

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

Identify the primary key attributes for the weak entity “Borrower”.

A

member num (primary key from “Member”) and first name.

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

Why is the “Borrow” table complex?

A

It links multiple entities and includes composite keys (book id, copy num, member num, first name) along with borrowing details like dates and fines.

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

Provide an example schema for a weak entity.

A
  • Copy(book id, copy num)
  • Borrower (member num, first name)

Both rely on keys from their main (owner) entities.

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

What do hierarchies represent in ER-models?

A

They represent “is-a” relationships, similar to inheritance in object-oriented programming.

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

Give an example of an entity hierarchy in a university setting.

A

UG_student (undergraduate) and PGT_student (postgraduate taught) entities are specialisations of a general student super-entity.

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

Provide an example of a vehicle hierarchy in ER-modelling.

A

Cars, trucks, and motorcycles are special cases (sub-entities) of a general vehicle super-entity.

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

Illustrate a customer hierarchy with an example.

A

Private customers and business customers are specialised entities derived from a more general customer entity.

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

What does “coverage” mean in ER hierarchies?

A

Whether subclasses fully (totally) or partially cover all instances of the superclass.

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

Explain “overlap” in ER hierarchies.

A

Indicates if subclasses can share common instances (overlapping) or must be mutually exclusive.

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

Provide an example illustrating partial coverage and mutual exclusivity in entity hierarchies.

A

“Private customer” and “Commercial customer” entities partially cover the “Customer” superclass, as there can be other types (e.g., government, charities).

They are mutually exclusive since no instance can be both types simultaneously.

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