2. ER Diagrams – 4marks Flashcards

1
Q

Why is conceptual modelling important?

A

Without conceptual models, it is very difficult to communicate database designs to (non-technical) users - This lack of communication may result in user’s data requirements being missed or incorrect requirements being captured

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

The type of conceptual model used in this course is…

A

Entity Relationship (ER) Model, by drawing ER diagrams (ERD’s).

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

What is a Universes of Discourse (UoD)?

A

The UoD is the relevant portion of the real world to be modelled by the database, i.e a mini world
The database to be built will not model everything in the world but everything in the UoD

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

An entity has the following properties…

A
  • Real-world object distinguishable from other objects (e.g a student, car, job, subject, building etc.)
  • is described by a set of attributes.
  • On an ER diagram, shown as entity name (noun) in a rectangle
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

An attribute can be of the types…

A
  • Composite Vs. Simple Attributes
  • Single-valued Vs. Multi-valued Attributes
  • Derived Vs. Stored Attributes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

In general attributes are represented on an ER diagram by

A

a circle with the attribute name.

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

Key attributes have the following properties…

A
  • Key (or uniqueness) constraints
  • Key attribute’s values are distinct for each individual entity
  • Key must hold for every possible extension of the entity type
  • Multiple keys are possible
  • On an ER diagram, a key attribute has its name underlined inside the oval
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Value set attributes have the following properties…

A
  • Specifies the set of values that may be assigned to a particular attribute of an entity (eg: Employee Age: Integers between 21 & 65 or Vehicle Registration Number: String of 3 alphabets followed by 3 integers)
  • Value sets map to relational domains
  • Value sets are not displayed on the ER diagram
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

NULL valued attributes have the following properties and types…

A

Properties
• Applies if a particular entity does not have an applicable value for an attribute
Types of Null Values
• Not Applicable (eg: Tertiary-Degree is Not applicable for a person with no university education)
• Unknown (eg: Home-Phone is Not known even if it exists)
• Missing (eg: Person’s Height: Not known at present time)

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

Composite attributes are…

A

• attributes can be divided into smaller parts which represent simple attributes with independent meaning (eg: name can be broken into First name and Last name)

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

Compare Single and multivalued attributes…

A
  • Single value only allows one value (eg: Gender is M or F, not both) whereas multivalued can have more than one (eg: Degree = {BSc, BInfTech}
  • On an ER diagram, single have a single bordered circle, while multivalued have a double border.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Derived attributes have the following properties…

A
  • Can be derived from related attribute values: (Age  Date - B-day)
  • On an ERD, represented by a broken line border circle.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Constraints which can be defined using ER model include

A

• Cardinality Constraints
• Participation Constraints
(Together called “Structural Constraints” )

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

Cardinality ratios for ER are:

A
  • 1:1
  • 1:N
  • M:N
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Consider the conditions:
One employee can only work in one department, but one department can have many employees.
What is the cardinality of this relationship and on which side of the relationship is each side of the ratio drawn?

A

ANSWER:
It is a 1:N relationship
The 1 goes on the side of the department and the N goes on the side of the employee.

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

Participation constraints have the following properties…

A

They are either:
• TOTAL Participation (Existence Dependency) (eg: Constraint: Every employee must work for a department)
• PARTIAL Participation (eg: Constraint: Not every employee is a manager)
• Represented on ER by double lines (partial only double on one side of the relationship)

17
Q

Attributes of 1:1 or 1:N relationships…

A

Can (probably should) be migrated to one of the participating entities

18
Q

Attributes of M:N…

A
  • CAN NOT Be migrated to the participating entities.

* Must have identities of the participating attributes must also added (during later mapping).

19
Q

Weak entities have the following properties…

A
  • do not have key attributes of their own
  • identified uniquely only by considering the primary key of another “Owner” entity
  • relationship type that relates a weak entity to its owner is called the “Identifying relationship”
  • Represented on ERD by a double line, otherwise the same as the usual entity rectangle with name.
  • Also, on ERD, the relationship relating to it’s owner is also a double line (on normal diamond for relationship).
20
Q

Extended ER (EER) includes additional attributes of:

A

Superclass and subclass

21
Q

Super class and subclasses have the following properties…

A
  • Attributes of a superclass are inherited by the subclasses.
  • Entities in the same class have the same attributes
  • Subclass can have its own specific attributes & relationships
  • Every entity in a subclass is a member of its super class(es)
  • Can be overlapping (could be both) or disjoint (must be one or the other)
22
Q

A relationship on an ER is represented by:

A

• A diamond with the relationship name inside.