Principles of Database Management Lecture 3
Multiple Choice Questions
Question 1
Given the following EER specialisation:
ProductNr
Supermarket Brand
products
t
d
Food Non-food
p
d
Fruits &
Meat
Vegetables
According to the model, which of the following statements is CORRECT?
a. A supermarket product can be a food and non-food product at the same time.
b. There are certain supermarket products that are not Fruits&Vegetables, not meat and not non-food.
c. All food products are either Fruits&Vegetables or meat.
d. A meat product does not have any attributes types.
Question 2
Principles of Database Management Lecture 3
Given this specialization, which of the following statements is CORRECT?
a. A customer can be both private and business.
b. A private customer has no attributes.
c. A customer is always either a private client or a business client.
d. This specialization is partial.
Question 3
Given the following EER categorisation:
Patient
p
u
Name Name
Date of Man Woman Date of
birth birth
Which statement is CORRECT?
a. All men and women are patients.
Principles of Database Management Lecture 3
b. A patient only inherits the ‘Name’ and ‘Date of Birth’ attribute types from the superclass that the
patient current entity belongs to.
c. The categorisation can also be represented as a specialisation.
d. The categorisation can also be represented as an aggregation.
Question 4
Which of the following statements about this EER model is CORRECT?
a. A private flight can have zero to many customers.
b. A flight can be both commercial and private.
c. An airline is existence dependent on a flight.
d. The attribute type ‘flightNR’ can be used to uniquely identify a private flight.
Question 5
Which one of the following is an example of a DISJOINT and PARTIAL specialisation?
a. HUMAN VEGETARIAN + NON-VEGETARIAN
b. HUMAN BLONDE + BRUNETTE
c. HUMAN LOVES FISH + LOVES MEAT
d. HUMAN UNIVERSITY DEGREE + COLLEGE DEGREE
Question 6
Principles of Database Management Lecture 3
Which of the following statements is CORRECT?
a. An aggregation cannot have attribute types.
b. An aggregation cannot participate in a relationship type.
c. An aggregation should have both attribute types and participate in one or more relationship types.
d. An aggregation can have attribute types and participate in relationship types.
Question 7
Consider the following EER model of a database which stores information about scientific publications.
Phone DOI
ID Keywords
number (1..n) (0..n) Scientific
Author
article Title
t
o Author t
Person position
Citation d
(1..n) count
Reviewer
(1..n)
Peer reviewed
paper Technical Report
(0..n)
(0..n) (0..n)
Name
P Name
(1..1)
Title
Publisher (1..1) (1..n) Journal
Impact
(0..n) factor
Subscribes
(0..n) (1..1)
Institution
Works for (1..1) code
Research institution
Which statement is CORRECT?
a. According to the EER model, a scientific article can be at the same time a peer reviewed paper and a
technical report.
b. According to the EER model, an author can be a reviewer of his/her own peer reviewed paper.
Principles of Database Management Lecture 3
c. According to the EER model, two journals can never have the same title, even when they are being
published by different publishers.
d. The EER model has weak entity types, but no existence dependent entity types.
Question 8
Which statement is CORRECT?
a. A class is an instance of an object.
b. A class only has variables.
c. Inheritance is not supported in Object-Orientation.
d. Information hiding (also referred to as encapsulation) states that the variables of an object can only
be accessed through either getter or setter methods.
Question 9
Which variables types are not directly supported in UML?
a. Composite variables
b. Multivalued variables
c. Variables with unique values (similar to key attribute types in the ER model)
d. Derived variables
Question 10
Which of the following statements is NOT CORRECT?
a. In UML, access modifiers can be used to specify who can have access to a variable or method.
b. A private access modifier (denoted by the symbol ‘–‘) is used in case the variable or method can only
be accessed by the class itself.
c. A public access modifier (denoted by the symbol ‘+’) is used in case the variable or method can be
accessed by any other class.
Principles of Database Management Lecture 3
d. A protected access modifier (denoted by the symbol ‘#’) is used in case the variable or method can
be accessed by both the class and its superclasses.
Question 11
Which of the following statements about the above UML model is correct?
a. A movie can have more than one director.
b. A production can be a movie and a play at the same time.
c. A person can be an actor and a director in the same production.
d. A movie’s ReleaseDate can be freely changed.
Question 12
Which statement is CORRECT?
a. An association is an instance of a link.
b. Only binary associations are supported in the UML class diagram.
c. An association is always bidirectional.
d. Qualified associations can be used to represent weak entity types.
Question 13
Principles of Database Management Lecture 3
A composite aggregation
a. has a maximum multiplicity of 1 and a minimum multiplicity of 0 or 1 at the composite side.
b. has a maximum multiplicity of n and a minimum multiplicity of 0 at the composite side.
c. has a maximum multiplicity of n and a minimum multiplicity of 0 or 1 at the composite side.
d. has a maximum multiplicity of 1 and a minimum multiplicity of 1 at the composite side.
Question 14
Which of the following statements is NOT CORRECT?
a. This aggregation is composite.
b. The maximum multiplicity at the side of ‘Book’ should be 1.
c. The minimum multiplicity at the side of ‘Book’ should be 1.
d. ‘Chapter’ will automatically be removed when ‘Book’ is removed.
Question 15
Which statement is NOT CORRECT?
a. The changeability property specifies the type of operations which are allowed on either variable
values or links.
b. OCL constraints are defined in a procedural way.
c. OCL constraints can be used for various purposes such as, to specify invariants for classes, to specify
pre- and post-conditions for methods, to navigate between classes, or to define constraints on
operations.
d. In UML, dependency defines a ‘using’ relationship which states that a change in the specification of a
UML modeling concept may affect another modeling concept that uses it.
Principles of Database Management Lecture 3
Open Question
Fitness company “Conan” wants to setup a database for its members and trainers. One of the aims is to
record information about which members participated in which sessions and which trainers supervised which
sessions.
Conan operates various fitness centers in various cities. Every center is characterized by a unique name (e.g.
Fitplaza, my6pack, …). Every center has an address and one or more rooms (you can consider address as
atomic). Every room has a maximum capacity. Within a center, each room has a unique number such as 1, 2,
3, …
People can register for individual or group sessions in different centers. Each group session requires exactly 1
trainer. Individual sessions are done without a trainer. For each person, we want to store the first name,
family name and birth date. You can assume that the combination of first name, family name and birth date is
unique. For each trainer, the diploma is also recorded. A person can be trainer in one session and participant
in another session (either individual or group session). The model should also include information about
people (e.g. prospects) that have not participated in any sessions yet, or trainers (e.g. interns) which have not
supervised any group sessions yet.
For each session, the date and starting hour should be recorded. For group sessions, also the type should be
stored (e.g. aerobics, bodystyling, etc.). Sessions can start at the same time at the same day but in different
rooms of a center or in different centers. At a given start hour of a given day, at most one individual or group
session can start in a given room of a given center.
Make an EER model and UML class diagram to model the data requirements for Conan. Comment on the