Uploaded by fowasej210

Assignment1

advertisement
DIT033 /DAT335– DATA MANAGEMENT
ASSIGNMENT 1
Chalmers | University of Gothenburg
Deadline: 29/01/2023
General Remarks
• There are in total 50 points to be reached for this assignment, and you need at
least 25 points to pass the assignment. Note that you need to pass all the assignments to get a pass grade in the assignment submodule.
• Assignment solutions are to be produced in teams of two students. Discussions
with other colleagues (e.g., on slack) are encouraged, but do not share your assignment solutions, or significant parts, with your colleagues (neither through the
slack nor through any other means). If we find that multiple groups submitted the
same assignments, we reserve the right to fail all involved groups.
• Remember to also hand in self- and peer assessment forms (individually, not per
team). Self-and peer assessment forms available on Canvas.
• You are free to draw your diagrams using any tool of your choice, but please make
sure that your notation is the same as is used in the book and lecture. A notation
cheat sheet is contained in the appendix. You are also free to draw the diagrams
by hand and scan them but be careful that everything is legible.
• No deadline extensions are given. Start early and, after finishing your assignment,
upload your submission as a single PDF file in Canvas. The submission system
closes automatically, and we do not accept late submissions.
• Shortly after the deadline, we grade the assignment and send you feedback. If you
were unable to submit, or have failed the assignment, you will have the possibility
to submit an improved version of the assignment after the course ends. (Details
regarding re-submissions will be published on canvas later)
• In case of resubmission, you will also need to submit a detailed change log along
with the assignment, reflecting on the changes made, where these changes were
made and why?
DIT033 / DAT335 – Data Management, Spring 2023
Page 1 / 6
Section 1: Entity Relationship (ER) Model.
Task 1: Analyzing an ER Diagram
[6 points]
2.1 Can an “assembly line” exist without a “factory”? Why or why not?
[2 points]
2.2 Does a “model” have a unique combination of name and number? Why or why not? [2 points]
2.3 How many parts a “vendor” can supply(min/max)? Does the diagram allow to have parts that are
produced in-house? Explain briefly.
[2 points]
DIT033 / DAT335 – Data Management, Spring 2023
Page 2 / 6
Task 2: Creating an ER Diagram for a given scenario
[16 points]
This task is based on knowledge from Lecture 2. You can start immediately after this lecture.
Your task is to draw a basic entity relationship (ER) model that accurately reflects each requirement of the description given in section 3.1.
Use the 1/N/M notation - A notation cheat sheet is provided in the appendix of this assignment.
3.1 Description of Universities Database:
You need to model a database to keep track of scientific conferences:
Conferences have an unique name, a location, a duration, and an edition (e.g., 2nd edition). The
duration is specified through a begin and end date.
Conferences are attended by delegates (i.e., people attending the conference). Delegates can attend
multiple conferences, and clearly a conference can have many delegates attending. For each delegate, we
need to store when they registered for each conference (“RegDate”). For each delegate, we further need
to store a participant id (which is globally unique for each delegate), their name, and country.
Conferences further consist of tracks. Tracks have a name which is unique for a conference (but not
necessarily unique overall), a topic, and a time. Every track has exactly one track chair, who is a special
delegate responsible for coordinating a track. Any delegate can chair multiple tracks, but some delegates
may not chair any track.
2.1
Finally,
Tips tracks consist of presentations. For each presentation, we need to save the title, which is unique
in a track (but, again, not necessarily unique overall), and the start time. Each presentation is given by
exactly one delegate (the presenter), but there may be delegates who are not giving any presentations.
Each delegate may give multiple presentations.
Important Tips:
• Go step by step: first identify the entities in this model along with the attributes they
have.
• Next, identify how the entities relate to each other (i.e., which relationships they have).
• Then add cardinalities.
• Particularly make sure that all entities have a primary key, and all associations have
cardinalities.
• Make sure that you model full or partial participations where appropriate (the single or
double lines in associations), and that you use weak entities (entities with double-lined
borders) when appropriate.
• We recommend using the cross-platform modelling tool diagrams.net 1 (but you are
free to use different tools if you can create the same notation as we used in the course).
• With diagrams.net, choose the Entity Relationship Diagram template under Basic but
delete the example diagram which uses another notation.
• This step automatically opens the Entity Relation shape palette where you can find
shapes for (weak) entities, (derived/multivalued) attributes, relationships, etc. Alternatively, enable the shape palette under More Shapes... > Software > Entity Relation.
DIT033 / DAT335 – Data Management, Spring 2023
Page 3 / 6
Note: For this task, you should not need any of the additional features introduced in the
Enhanced Entity Relationship notation (notably, you should not need any inheritance).
Section 2: Enhanced Entity Relationship (EER) Model.
Task 3: Analyzing an EER Diagram
[6 points]
This task is based on knowledge from Lecture 3. You can start immediately after this lecture.
Analyze this EER model related to plants:
Answer the following questions, and provide a short explanation for each answer:
3.1. Does the diagram support components that are not “memory”, “soundcard”, or “videocard”? Why/ why not?
[2 points]
3.2. Can an keyboard be sold without selling a computer?
[2 points]
3.3 What are the attributes of laptop?
[2 points]
DIT033 / DAT335 – Data Management, Spring 2023
Page 4 / 6
Task 4: Creating an EER Model for a given Scenario
[22 points]
The aim of this task is to design an EER model. You are required to draw an EER model that
accurately reflects the requirements of the description in section 4.1. Specify the entities, attributes, keys, specializations, relationships including names, cardinalities, and totality constraints to model the description. Make sure that all necessary elements are modeled such that
the system can fulfill the described requirements. Explicitly state any unspecified requirements and make appropriate assumptions to fill in the gaps only where necessary.
Follow the notation from the lecture, (you can also refer to the notation cheat sheet given in the
appendix of this assignment).
4.1 Scenario for EER:
"Baker's Choice" is a company providing bakery equipment and services associated with the equipment.
Its customers may buy or lease the equipment for their needs and request maintenance or repair services
from time to time. The company needs to design a database to improve its operations.
A customer buys or leases a piece of equipment which can be a single machine or a series of machines
combined together into one unit called cell. Each piece of equipment is described by unique ID, title, and
category. Single machine is presented in the database by its hourly capacity and price. A cell is described
by a product the cell can make and its discount. It is necessary to record all single machines included into
a given cell. A machine can be included into one cell only.
Customers are assigned customer ID, company name, address, and contact phone number. A customer
may lease more than one piece of equipment. When a customer leases a piece of equipment a lease
contract is signed. It includes unique contract number, first and last dates of the lease. It is important to
know who leases which piece of equipment. Each piece of equipment can be leased by more than one
customer over its lifetime. The same customer may re-lease the same piece. In this case a new lease
contract is issued.
When a customer buys a piece of equipment, an invoice is issued. The invoice is described by its unique
number and the date of the purchase. It is necessary to know the buyer of the equipment. The invoice can
include one or more pieces of equipment. For each piece, the sale price is recorded. After the customer
pays the invoice, there is no return. However, on customers' request, "Baker's Choice" provides technical
support which includes one or more maintenance or repair services.
Customers may request services on both bought and leased equipment. Company's employees implement
these services. Each employee is described by employee ID, name, phone, and occupation. For each
service provided by the company, service ID, its title, and the cost of labor must be recorded in the
database. A service may cause one or more other services, e.g., maintenance may require a part
replacement. Each service can be caused by many other services. This information is to be included in the
database. Each service may require materials which can be parts, tools, or chemicals. Each material is
described by a unique id, title, and its price.
Machines may fail from time to time. If a problem is encountered, it must be recorded in the database. A
problem is described by its sequential number for each machine, description, and date. If a machine is no
longer in use, its record is removed from the database along with the records about associated problems.
Each problem is associated with a service. This association must be recorded.
A request for a service on a particular piece of equipment results in an appointment scheduled on a certain
date. An appointment is described by ID, date, and time slot. An employee is assigned to each
Appendix
A.assignment
E(E)R Notation
Cheat
sheet
appointment.
This
must be recorded
in the
database. Each appointment can be associated with
more than one service.
DIT033 / DAT335 – Data Management, Spring 2023
Page 5 / 6
DIT033 / DAT335 – Data Management, Spring 2023
Page 6 / 6
Download