0% found this document useful (0 votes)
12 views14 pages

ExercisesWeek1,2,3 DataModeling

This document contains exercises on data modeling for the course Fundamentals of Business Information Systems at Eindhoven University of Technology. It includes various exercises for weeks 1, 2, and 3, focusing on basic and advanced data modeling techniques, such as classes, objects, associations, and constraints. Students are encouraged to solve these exercises through self-study and guided classes, with solutions provided weekly for comparison and reflection.

Uploaded by

twanvanderhijden
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views14 pages

ExercisesWeek1,2,3 DataModeling

This document contains exercises on data modeling for the course Fundamentals of Business Information Systems at Eindhoven University of Technology. It includes various exercises for weeks 1, 2, and 3, focusing on basic and advanced data modeling techniques, such as classes, objects, associations, and constraints. Students are encouraged to solve these exercises through self-study and guided classes, with solutions provided weekly for comparison and reflection.

Uploaded by

twanvanderhijden
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Exercises on Data Modeling

Fundamentals of Business Information Systems (1BV00)


Week 1, 2, 3

Editor: Rik Eshuis

Version 1.1 January 2020

Eindhoven University of Technology


School of Industrial Engineering
Information Systems
PREFACE

This document contains data modeling exercises for the course Fundamentals of Business
Information Systems (1BV00). The process modeling exercises are in a separate document.

Students must solve these exercises by self-study. In guided self study classes (2 hour, Wed
morning), students can work on solutions for these exercises and ask questions to teaching
assistants. But more hours will be needed each week to solve the exercises.

Solutions for all exercises are made available each Wednesday after 13:00h. It is a necessity of
the educational process that students first make their own solutions, then compare these solutions
with the model solutions, and finally reflect about differences, for instance by asking the question
why an answer they thought to be correct, in fact is wrong. Many years of experience have
confirmed that learning by doing and learning from own mistakes are essential ingredients of the
learning process for data modeling. Understanding a model solution is therefore not sufficient.

The problems have been created (and translated from Dutch) over a period of more than a decade,
in courses, such as Technieken voor Datamodelleren, Specificeren van Informatiesystemen, and
Data and Object Modeling. Most problems are, in their first or most recent variants, from Robert
Schuwer, Jan Goossenaerts, and Gerd Wagner. Some problems have been inspired by problems
available on the World Wide Web. The previous edition has been edited by Samuil Angelov.

In this reader, the pre-requisite knowledge of the successive groups of exercises is expressed in
reference to the Information Modelling reader of the Fundamentals of Business Information
Systems course.

The editor
Eindhoven, January 2020
EXERCISES WEEK 1

In this week, you exercise basic data modeling techniques: classes, objects, associations, links,
and constraints. You practice with creating simple data models.
You can create your models on paper or with a (cloud-based) editor for class diagrams on your
laptop, like Visual Paradigm. However, object diagrams cannot be created in editors like Visual
Paradigm.

1. INTRODUCING CLASSES AND OBJECTS

Draw a class Student that has as attributes student number, student name, and date of birth.
Draw an object Ron which is from the class Student. Ron has student number 0001 and is born on
01-01-1985.

2. USING CLASSES, OBJECTS, ASSOCIATIONS, AND LINKS

Draw a class diagram that has two classes: Student and Course:
a. Connect the Student class with the Course class using an association.
b. Add three relevant attributes for each of the classes. For example, for the class Student
you may define student number, student name, and date of birth.
c. Add multiplicity constrains on both ends of the association: a student takes one or more
courses; a course is taken by zero or more students.

Draw an object diagram in which Ron (an object from the class Student) takes the BIM course
(an object from the Course class). Provide values for all attributes of the objects.

3. PERSON IS EMPLOYEE OF COMPANY

Draw a class diagram described by the fact Person is Employee of Company and the following
statements:

a. It is possible that some Person is not Employee of any Company.


b. Each Person is Employee of at most one Company.
c. Each Company has at least one Person as Employee.
d. It is possible that the same Company has more than one Person as Employee.

(Draw one class diagram that addresses all these statements)

4. STUDENT TAKES EXAM

a. Model in an object diagram the fact that Ron (whose student number is 237784) takes the
1BB50 exam on 6-Oct-2003.
b. Model the more general situation of students taking exams with the help of a class
diagram.
c. Attach sample extensions (populations) to all classes and associations in your model.
d. Which are the unique attributes in this model? Notice that it should not be possible to
have more than one exam per course per day.
e. Is it compatible with your class diagram for a person to take more than one exam? If this
is not the case, change the class diagram in a way, which makes this possible.

5. CONFERENCE MANAGEMENT

In the problem domain of conference management, we may use a class Session for
representing the different sessions of a conference, which consist of a number of paper
presentations, and a class Participant for representing the conference participants. The
following class diagram also contains the chairperson association between Session and
Participant:

* 1 ChairPerson

3 joins
Session Participant
* *

a. Is it compatible with the class diagram for a participant to be the chairperson of multiple
sessions at a conference? If not, change the class diagram in such a way that makes this
possible.
b. Add attributes and attach sample extensions (populations) to the classes and the
association in this diagram.
c. Change the class diagram in such a way, which makes it possible for some sessions (for
instance, the main sessions) to have a vice-chairperson (note that a class may be
associated in different ways to another class).
d. Suppose participants evaluate sessions. Extend the class diagram in such a way that it
becomes possible for participants to grade sessions in a session evaluation.
e. Further extend the class diagram such that a session evaluation includes a number of
paper evaluations, and it becomes possible to evaluate each paper with a grade.

6. COURSE PREREQUISITES

The following class diagram describes some concepts from the problem domain of university
course management. Courses are given by faculty members. Courses have pre-requisites, that is,
certain other courses have to be taken before a specific course can be attended.
prerequisite Course isGivenBy
CourseID FacultyMember
0..1 CourseName * *

a. Verbalize the recursive association between courses. Using CourseID as the standard
identifier of the Course class, give a sample extension (population) for this class and the
recursive association.
b. Is it compatible with the given class diagram that a course can have more than one pre-
requisite course? If this is not the case, change the class diagram in such a way that makes
this possible.
c. Is it possible for several courses to have the same course as a prerequisite? If this is not
the case, change the class diagram in such a way that makes it possible.
d. Express a constraint that prevents a course from being its own pre-requisite.

7. R&D PROJECT FUNDING

Governmental agencies use certain rules for funding research and development (R&D) projects.
The following remarks describe an information system that helps to put together committees for
evaluating R&D project proposals.

In general, a new R&D funding program is started by issuing a call for proposals (CFP) that
specifies a number of themes for which project proposals can be submitted. When the submission
deadline has passed, the project proposals submitted for a specific theme are evaluated by a
committee composed of external experts that are competent for this theme. One of the committee
members is appointed as chairperson. A theme may appear in more than one CFP. A CFP has a
unique reference number, a research program name, a date of publication, and an available
budget. The following information about experts is kept up-to-date: a unique identification
number, name, gender, date of birth, and the themes for which the expert is competent.

Make a class diagram including the most important object classes and constraints.

8. EXEMPTIONS AT THE OPEN UNIVERSITY

Students at the Open University (OU) have often completed other studies before they start
studying at the OU. They are usually eligible for exemption from part of their study programme
at the OU, as a result of their previous studies. A simplified description of the process involved in
such an exemption request is given below for someone hoping to study information science. An
information system for handling the exemption requests and decisions is to be developed. For
each student, a student number, name and address are registered. Many students have completed
one previous course of study; for example, Information Science at a higher technical college
(HTS), Dutch law or Tourism studies. There are now two possibilities:
Possibility 1
For several common types of previous study (such as Information Science at HTS), there are
standard exemption profiles (one for each previous study). Such a profile shows whether or not
there will be an exemption, for each subject to be followed at the OU. If the student has
completed one of these previous studies, the exemption decision for a subject will be justified by
means of the profile that applies to the student.
Possibility 2
If the student’s previous study does not fit into any standard profile, then the student must hand in
a request for which subjects he or she would like to be exempted. The decision, whether or not an
exemption is granted, is then registered per subject. If no exemption is granted for a particular
subject, then the reason for that is also registered.

Make a class diagram. State any assumptions that you have made.
EXERCISES WEEK 2

In this week, you exercise advanced modeling techniques: association classes, specializations. It
starts with three trivial exercises to practice the new concepts.

1. AN ATTRIBUTE OR A CLASS?
Draw a class diagram in which information about students that speak various languages is
modeled. A student has a name, age and gender. Each student can speak many languages (at least
one of course). Model the language as a separate class and explain why it is better to be modeled
separately and not as an attribute of the class student.

2. USING ASSOCIATION CLASSES


Draw a class diagram for a company that is leasing vehicles. The model has two classes: vehicle
and client. For clients the name and passport number are registered. For each vehicle that a client
leases, the leasing date and the monthly payment agreed are stored. Model this information as an
association class and explain why it is modeled in this way.

3. USING SPECIALIZATIONS

Draw a class diagram for a company that is leasing cars and sailing boats. The model has three
classes: Car, Sailing boat, and Vehicle. The Vehicle class is a generalization of the Car and
Sailing boat classes and has a unique identifier and purchase date as attributes (so for all cars and
boats the id and the purchase date are stored). The company may obtain other vehicles in the
future. For each car the engine size is registered and for boats their type is registered.

4. THE ELEVEN CITIES RACE

The 'eleven cities race' is an ice skating race that is carried out, provided the weather conditions
allow it, on the frozen canals in Friesland. A great deal of information is required to successfully
organise an 'eleven cities race'. The description below is about the information required by the
Friesian Eleven Cities Association to organise the event. Although the event is called the eleven
cities race, there are far more than eleven towns (the so-called cities) on the route. One of the
towns is the start and end of the race. The name of each town is registered. The route is split up
into sections. For each section, the starting town, the ending town and the length (in kilometres)
of the section is registered.

The name, address, place of residence and gender of each of the participants is registered. There
are two sorts of participants: competition skaters and non-competition skaters. The starting
number of competition skaters is registered. When the race has finished, the end-time (if he or
she finishes) or the comment N.A. (if he or she dropped out, N.A. stands for "Not Admissible”) is
recorded for the competition skaters. For the non-competition skaters, their Friesian Eleven Cities
Association membership number and their start time are recorded. The participant must get a
stamp on his or her personal record card at each town on the route. The stamp contains the time
of stamping. A record is kept for each participant of whether there is a stamp for each location.

Make a class diagram. State any assumptions that you have made.

5. CIA- WORLD FACT BOOK

The World Factbook, published by the U.S. Central Intelligence Agency (CIA), lists detailed
information about countries and international organizations. An example of a country description
is the following:

Netherlands
§ Population: 16,067,754
§ Area: 41,526 sq km
§ Capital: Amsterdam
§ Border countries: Belgium 450 km, Germany 577 km
§ Languages: Dutch
§ Religions: Roman Catholic 31%, Protestant 21%, Muslim 4.4%, other 3.6%
§ Life expectancy at birth: female: 81.59 years, male: 75.7 years
§ Currency: euro
§ Currency code: EUR
§ Exchange rates: euros per US dollar - 1.1324
§ Military expenditures: $6.5 billion
§ Head of government: Jan Peter BALKENENDE
§ Political parties and leaders: Christian Democratic Appeal or CDA [Jan Peter
BALKENENDE]; Green Party [Femke HALSEMA]; etc.
§ International organization participation: Benelux, CERN, EMU, ESA, EU, etc.
Also, the Factbook lists cities together with the country they belong to and their latitude and
longitude, in a special table. An example of an international organization description is the
following:

European Organization for Nuclear Research (CERN)


§ established: 1 July 1953
§ aim: to foster nuclear research for peaceful purposes only
§ headquarter: Geneve
§ members: Austria, Belgium, Bulgaria, Czech Republic, Denmark, Finland, France,
Germany, Greece, Hungary, Italy, Netherlands, Norway, Poland, Portugal, Slovakia,
Spain, Sweden, Switzerland, UK
Make a class diagram for this fragment of the CIA Factbook, which includes the object classes
Country, City, IntOrg (for international organizations) and Person, as well as a number of other
object classes needed to model the entity types mentioned in the above fragment of the Factbook.
For each of these object classes, include in the model all attributes, associations (or association
classes) and role names needed to capture the information mentioned in the above examples to
describe the country “Netherlands” and the international organization “CERN”.

6. ARTICLES IN A CHAIN STORE

This case concerns the chain stores of a single company (for example AH). The supermarkets
(stores) within the chain have the same structure. They have an identification number, an address
and a telephone number. Also the name of the manager of a store is stored in the information
system.
There is a set of articles defined for the chain. Each article is identified with a unique code.
Moreover each article has a unique description. There are two kinds of articles, i.e., packed
articles such as washing powder, milk, light bulbs; and unpacked articles such as cheese, certain
meat products and tomatoes. About packed articles we need to know the net contents, in which
unit it is measured (kg, gram, litre, meter), and the gross weight. About the unpacked articles it
must be known what is the quantity unit for which the price has been fixed, in what units it is
supplied (crate, can, bag, piece), and how many quantity units there are in the supply unit.
For each article, the sales price is fixed for the whole chain. For packed articles the price is
determined per piece. For unpacked articles it is determined per quantity unit. For each article it
is recorded from which wholesalers the article is purchased. For each article there can be more
than one wholesaler from which it is sourced.
Each store in the chain has an assortment (a subset of the set of articles defined for the chain). For
each article in the assortment of a store one determines the reorder quantity, safety stock, current
stock, and preferred wholesaler (the reorder quantity is the quantity that is ordered when current
stock falls below the safety stock). The preferred wholesaler for an article in the store must be
one of the wholesalers, which has been listed by the chain as a potential supplier of the article.
Make a class diagram in which the most important object classes and constraints are represented.

7. WASTE MANAGEMENT

Waste Management Consultancy (WMC) Ltd., a London-based company that offers waste
management services, wants to develop a waste trade information system to match “waste
suppliers” (WS), companies/organizations that want to sell or want to dispose certain kinds of
waste, with “waste consumers” (WC), companies that can use certain kinds of waste as input to
their production process, possibly separating reusable materials from residual waste, and
companies that offer to dispose non-reusable waste (WD). WMC wants to obtain revenues from
companies/organizations that contact WMC to help them in finding a solution to their waste sales
or disposal need. WMC’s services include waste transportation with the help of 3rd party logistics
service providers (3PL). Notice that not every 3PL is able to transport every kind of waste. For
instance, there are special companies offering transport services for hazardous materials.

The trade information system has to maintain information


• for each WC, which types of waste it consumes, including for each type the price it is
willing to pay (per unit of volume)
• for each WD which types of waste it can dispose, including for each type the cost to
be charged to the waste supplier
• for each 3PL which types of waste it can transport, including for each type the cost per
unit volume per km to be charged to the waste supplier

When a WS has a waste disposal need, it informs WMC about the type of waste, its volume, the
date from which the waste is available, and the pick-up location. On the basis of these data, the
WMC planning software will calculate a price/cost optimal solution for the waste transportation
and disposal/reuse problem, considering locations of all parties involved How this calculation is
done is of no concern to us. The resulting price/cost and its date of calculation is stored with the
batch data and announced to the WS, who can accept or reject the quote.
a) Make a UML class model for WMC’s information system.
b) Include all important constraints that can be expressed in the class diagram. If there is one
that cannot be included in the class diagram, put it on a separate list.
EXERCISES WEEK 3

In this week, you exercise further the advanced modeling techniques: association classes,
specializations, 3-nary associations. Next, you exercise transformation of domain models into
system (design) models.

1. SWIMMING WORLD CHAMPIONSHIPS

The swimming world championships were organised this month. An information system was
made for the attending press. Participants, trainers and referees have a name, a gender, a date of
birth and a nationality. Each of these types of people has a common unique identification number.
Participants must have the nationality of the country for which they are participating. Trainers
represent a country, which can be different from their nationality. A participant is normally
coached by a specific trainer; sometimes a participant is coached by more than one trainer or
even by none. A trainer can be registered as the trainer of more than one participant. A trainer can
only represent one country and can only coach participants from that country.

Every participant is signed up to participate in at least one discipline. There can be more than one
competition for each discipline. The following information is registered about competitions: sort
(like quarter-finals, semi-finals, finals); date; time; location and referee. During a competition,
there is at most one trainer per participant (who can coach him/her in the competition area and the
changing rooms). The achieved result is also registered. A participant can only take part in a
competition of a discipline for which he or she has signed up.

Make a class diagram including the most important object classes and constraints.

Additional information:
To make it simpler, the class diagram has only to take individual competitions into account. You
do not have to consider relays (like 4 x 100m) and team matches and competitions such as water
polo. Examples of disciplines are “100 meter women’s free style’.

2. A-BIRD

A-BIRD is a new discount airline, which wants to build an online flight booking information
system. A customer of A-BIRD can book flights, possibly for different passengers. Only
individual, but no corporate, customers are accepted. A booking is done on a specific date for a
future flight with optionally a return flight, and one or more passengers. Normally, a booking
requires an advance credit card payment by the customer; in that case, the paid price is registered.
Alternatively, customers that are member of the A-BIRD frequent flyer club can "pay" with
points they have collected with previous flights. For those bookings, the spent points are
registered. The collection of points is supported by another information system; the flight
booking systems registers the total number of points for each frequent flyer club member.
A flight has a departure airport and a departure time, as well as an arrival airport and an arrival
time. For each flight, there is a list of weekdays on which it takes place. A flight may involve
stopovers in other airports. A stopover has an expected arrival time and an expected departure
time. Each airport serves one or more cities.
Make a class diagram including the most important object classes and constraints. It is important
to account for the difference between a generic flight (identified by flight number) and a
particular flight occurrence (identified by flight number and date).

3. MODELING A CAR RENTAL COMPANY

EU-Rent is a car rental company whose headquarter is located in Paris. It has more than 600
branches all over Europe. At each branch cars, classified by car group (such as Mini, Economy,
Compact, Full-Size, Premium, Luxury), are available for rental. Each branch has a manager and a
number of booking clerks who are responsible for rental reservations and a number of car
handling clerks who handle the pick-up and return of cars. Some booking clerks may also be car-
handling clerks.
A potential customer makes a rental reservation by specifying the rental period (pick-up date and
return date) and the desired car group. A customer can have several reservations but only one car
rented at a time. Cars picked up from one branch may be returned to another branch. The actual
pick-up and return dates as well as the pick-up and return branches are recorded.

Make a class diagram for EU-Rent, including all constraints that are mentioned in the text.

4. FLIGHT DOMAIN AND SYSTEM MODEL

Transform the following domain model into a system model.


*

Flight
1 DepartureAirport
FlightOccurrence FlightNo
1 ArrivalAirport
DepTime
DepDate
* 1 ArrTime * Airport
WeekDays
1..2 * * Name

*
Stopover
*
Customer -ArrivalTime
-DepartureTime
Booking Person 1..*
BookingNo * 1 LastName
Passenger
BookingDate FirstName City
ConfirmationStatus Address
Name
* 1
{disjoint, complete}

LoyaltyPoints
Regular Booking Booking
Price
5. NTJWC

The New Tampa Junior Women’s Club (NTJWC) is a volunteer organization located in Tampa,
Florida. It draws its membership from citizens in the city who enjoy volunteer work, and
provides financial assistance to a variety of charitable organizations. Currently, the club tracks
most of its information manually. This task has grown increasingly difficult as the club has
grown. Consequently, the club has decided that the creation of a computerized database is
warranted. The information below has been accumulated towards that goal.
The club currently has approximately 150 full members, as well as 30 provisional members (a
person who has recently joined the club and is not yet a full member). When a member joins the
club, they join as a provisional member and are assigned one or more full members as mentors
for the first year of their membership. Not all full members serve as mentors, but those that do
may mentor more than one provisional member.
The club would like to be able to produce a membership list to act as a club phone book. This list
would also facilitate the printing of mailing labels for the newsletters sent to members.
Information necessary for the membership list includes each member’s name, address, phone
number, fax number, e-mail address. In addition to the member information to be included in the
membership list, the club wants to record specific skills that the members possess that might be
useful to the organization. The names of skills currently held by club members include typist,
accountant, electrician, artist, and many others. A member may have many such skills. The club
has also decided that, in anticipation of computerization, each club member will be assigned a
unique Member ID, a sequential four-digit number (e.g., 0001, 0002, etc.) that will be used for
identification purposes.
The club’s membership is divided into committees. All members are assigned to one and only
one committee. Although a member may periodically change the committee they work on, only
the current assignment is of interest to the club. (That is, historic records of previous committee
assignments are not important.) The committees all have a unique name and a specific mission.
The minimum number of members needed for each committee is 5. Each committee has a
chairperson, who is also a member of the committee. There is no set term of office for committee
chairs. (Typically, the chair serves as long as they are willing.) Only the current chair of each
committee is of interest. (Records of past chairs are not kept.)
The club also receives donations. Each donation is assigned a Donation ID, a description of the
donation (e.g., cash, art work, automobile, etc.), the club member who is assigned as the contact
person for the specific donation (not all members act in this capacity, but some do so frequently),
and the monetary value of the donation (estimated for non-cash donations). All donations come
from one and only one donor. Each recorded donor has donated one or more times. Most donors
are business entities, although some are individual persons.
Make a class diagram for NTJWC. Translate this domain model into a system design model.
Important hints:
- Use LegalEntity as a superclass generalizing both Person and BusinessEntity.
- The model must allow that a club member is also a donor
6. PLANNING A DELIVERY DATE

Transform the following domain model into a system model.

Address
AddrCode DeliveryAddress
1 Street
MainAddress PostalCode
City 1
Country
1 GeoCode

Person
Employee
FirstName SalesPerson
EmpNo
LastName PremiumLevel
Salaray
DateOfBirth
1
{disjoint, *
complete}
Customer
LegalEntity SalesOrder
CustNo
LegEntNo SONo
isBlacklisted 1 *
1
Organization * *
* 1..*
LongName
ShortName CustomerItem
DelivDateTo SalesOrderLine
SOLNo
OrderQuantity
WarehouseItem RegDelDate
0..1
-QuantityInStock : Decimal * SONo
1..* 1..*
Item *
Warehouse
*
ItemCode
WHCode
Name 1

*
0..1 SourcingWarehouse
TransportMode
Name
Speed
1..* CostPerDistance

You might also like