Lab02S DatabasesDesign
Lab02S DatabasesDesign
You should also have answered the relevant questions at the end of the lab sheet. The above
statements are the learning outcomes of this laboratory and will be achieved in concert with the other
learning activities that you undertake for this unit.
d. Can databases only take one format or can they take many?
After this, your tutor will spend some time discussing these questions with your colleagues
within the tutorial room.
2. Spend the next ten minutes talking to those around you to consider relationships that can’t be
expressed in terms of a parent-child relationship between two entities. Determine two of these
relationships, which you will then share with the room.
3. Consider the following blurb below. What database model do you think is most appropriate of
document, relational, graph, NoSQL or object-oriented?
Kim runs a financial services company that organises peer-to-peer loans between
organisations. Some of these organisations loan money to other organisations, some receive
loans from other organisations and others do both of the above. Kim is not interested in
storing the loan transactional data itself; this is handled by a different system, but rather for
risk analysis Kim wishes to understand the relationships between different organisations.
Discuss this for five minutes with the students surrounding you. Your tutor will then spend some
time talking about the classes’ responses.
Kelly runs a tree-chipping business that converts planted trees into mulch. Kelly wishes to
track which sets of mulch are derived from which trees, and who it is sold to, to help with
planning her business and to determine which trees are most effective. Each sale consists of
a customer with an address. Each sale contains at least one batch of mulch. Each batch of
mulch contains of a certain weight of tree and a certain type of tree. Each batch of mulch
contains the contents of at least one tree. A tree can be in one or more batches of mulch;
however, it does not need to be in a batch of mulch. Each batch has a batch code associated
with it.
Design a data model for Kelly’s business, by completing the following tasks:
a. Define the sets of entities that Kelly must store for his system;
This should then allow you to form an entity-relationship diagram of Kelly’s system.
Raj runs a business selling donuts to customers. Due to demand, each transaction consists
only of one donut; however that donut may differ in cost and type between transactions. For
compliance reasons, Raj must store the name and email of each customer who purchases a
donut and desires to know when the donut was purchased to help understand demand.
Design a data model for Raj’s business, by completing the following tasks:
f. Define the sets of entities that Raj must store for his system;
This should then allow you to form an entity-relationship diagram of Raj’s system.
6. Consider the data that Raj now has. Which of the following can he derive from the data that
would be stored in rows for the tables modelled above?
End of activities. Please see the next page for the questions you may wish to answer.
Questions
Ensure you can answer these questions to cement your understanding of the lab.
5. What are the two relationships you have identified between entities in Question 2?
9. Write your answers for what Raj can retrieve from his system below.