Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Exercise 1

1. Foundations
a) Explain the notion of a database management system, a database and a schema. Distinguish
between external, conceptual and internal schemas.

b) Justify in which use cases a database management system might be better suited than file-
based storage. Consider the development of desktop applications, smartphone apps and web
applications.

2. ER Modeling
2.1 Social Network Data Model

A social network stores individual user profiles in a database. In order to conceptualize an


appropriate data schema, create a semantic data model using an ER diagram based on the following
information.

User profiles contain a first name, last name, a globally unique user name, a birthday and an email
address. A user profile may be connected to other profiles through an "is-friend-of" relation.
Furthermore, there exist user pages with a name, a numeric identifier and a slogan. User pages are
managed by one or more user profiles while each user profile might manage multiple user pages. A
user can «like» any number of user pages.

a) Create an ER diagram based on the information given by identifying entity and relationship
types as well as cardinalities.
b) Specify appropriate attributes and note key attributes used as identifiers.
c) Explain the concept of recursion within the example.

2.2 Online retailer

Consider the following scenario:

An online retailer offers its customers products from various categories, e.g. books, electronics and
fashion. Products are displayed to customers with name, description, price and a stock keeping unit
(SKU) as identifier. When a customer visits the website, a session is started during which any number
of orders can be placed. For each session, the time, date and IP address of the visitor is known. In case
a customer places an order over the course of a session, the order is recorded with an order id and at
least one order item. Each order item specifies the amount and price of one product of the order.
During the order process, the customers enters its name and street address with street, number, zip
code and city.

Université de fribourg / Universität Freiburg | FACULTÉ DES SCIENCES ECONOMIQUES ET SOCIALES / WIRTSCHAFTS- UND
SOZIALWISSENSCHAFTLICHE FAKULTÄT | Digitalisierung und Informationssysteme, Prof. Fill | Database Systems
a) Model the scenario as an ER diagram on the basis of the scenario. As a foundation for an
effective data schema, the diagram must be a suitable representation of all information
mentioned.

b) In addition to physical products, the retailer starts to offer digital products, i.e. video and
streaming services. Any order item may reference a digital or physical product. Explain an
appropriate concept and make according additions to the diagram.

2.3 Access Control

Consider the following scenario:

For managing the access control to rooms in a commercial office complex, authorizations for specific
rooms are granted to individual persons using key-cards. The access control system uses a database
to store this information and all authorizations granted.

Buildings have a street address and a short name, e.g. PER90. Each room is identified by a capitalized
letter and a three digit code, e.g. C312. Furthermore, the department responsible for the room and
the names of all persons with access authorization are stored here. The number of rooms a person
can access is not limited. Key-cards are issued per person. Whenever a new access authorization is
granted, it is recorded on a key-card identified by an alphanumeric serial number. The goal is to keep
track of each access authorization granted, i.e. the person, key-card and date and time of
authorization need to be recorded.

a) For clarifying the specific information required and for the design of an effective data schema,
model the scenario as an ER diagram.

b) Note the required attributes, key attributes and value ranges in order to prepare the transition to
the relational model.

Université de fribourg / Universität Freiburg | FACULTÉ DES SCIENCES ECONOMIQUES ET SOCIALES / WIRTSCHAFTS- UND
SOZIALWISSENSCHAFTLICHE FAKULTÄT | Digitalisierung und Informationssysteme, Prof. Fill | Database Systems

You might also like