Week 8 Tutorial Questions Solutions 1

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

lOMoARcPSD|9517029

Week 8 Tutorial Questions Solutions-1

Database Analysis and Design (Swinburne University of Technology)

StuDocu is not sponsored or endorsed by any college or university


Downloaded by qu? anh v? ([email protected])
lOMoARcPSD|9517029

INF10002 Tutorial 8

Tutorial 8 – Questions & Solutions

1. An organisation named DADCo Solutions has a number of employees, a name and a phone
number. Each employee can be identified by his/her employee id. Many employees purchase
computer equipment (such as a laptop or tablet) to use as part of their job. Each piece of
equipment has an id (a barcode supplied by the organisation), a description and a date of
purchase. Each piece of equipment only ever belongs to a single employee. Some employees
(generally those on a higher salary) have more than one piece of equipment.

Create an ERD solution based on the above narrative.


Convert the ERD to a relational schema.

EmpId EmpName
PhoneNo
BarCode
EMPLOYEE makes Equipment Description
DateOfPurchase

2. A primary school named Eastern Primary School wishes to democratically choose which
animal will become the school mascot. The list of alternatives includes Kangaroo, Koala,
Tiger, Elephant, Parrot, Penguin and so on.

Each student may vote for one or more of the animals to be the mascot. Each student has a
student Id and name. Each of the animals has been assigned a numeric id and name (e.g. 7
Tiger).

Create an ERD solution based on the above narrative.


Convert the ERD to a relational schema.

3. "The Melbourne Sudoku Championships" are about to take place.

Downloaded by qu? anh v? ([email protected])


lOMoARcPSD|9517029

INF10002 Tutorial 8

A number of competitors will compete in the championships. Each competitor has unique competitor
id and a name.
A number of Sudoku Puzzles have been generated for the championships.
Each puzzle has a unique number and a Grade (such as Easy, Hard, Diabolical).
E.g. Puzzle No: P222 Grade: Hard
During the championships, a puzzle is simultaneously given to a number of competitors. As
each competitor completes a puzzle his/her time is recorded.

The organisers of the champion ships want to be able to produce reports such as these:
Id Name Puzzle Grade Time
101 Peter Jones P120 Easy 2:41
101 Peter Jones P178 Medium 4:53
101 Peter Jones P222 Hard 8:44

Puzzle Id Name Time


P222 507 Nancy Lee 6:21
P222 101 Peter Jones 8:44
P222 324 Sid Davies 8:58
P222 078 Eric Tan 9:27
P222 041 Merv Hunter 9:27
P222 342 Shirlee Brown 15:42

• Create an ERD solution based on the above narrative.


• Convert the ERD to a relational schema.

4.
Sala Publishing encourages staff to write text books for University subjects.
Each text book has a title and a unique ISBN code. Each author has a First name, surname.
Assume that no two authors have the same name. Each Book written has a single Author.
Authors often complete two or three books a year.

Sala Publishing want to be able to produce reports such as this:

ISBN Title AuthorId Name


1122334455 Intro to Oracle 11 Peter Joshua
3031012022 Intro to VB.Net 45 Regina Lampert
1122446688 Advanced Oracle 11 Peter Joshua

Draw the ERD for the above situation.


Show examples of data stored in all the tables generated by your ERD

Downloaded by qu? anh v? ([email protected])


lOMoARcPSD|9517029

INF10002 Tutorial 8

5. The business narrative for the previous problem has changed slightly.
Any of the books published by Swinny Publishing could have multiple authors.

Swinny Publishing want to be able to produce reports such as this:

ISBN Title AuthorId Name


1122334455 Intro to Oracle 11 Peter Joshua
3031012022 Intro to VB.Net 45 Regina Lampert
7771117771 Year 1 Statistics 14 Hamilton Bartholomew
7771117771 Year 1 Statistics 36 Leopold W. Gideon
7771117771 Year 1 Statistics 28 Tex Panthollow
6060606060 Network Security 8 Sylvie Gaudet
6060606060 Network Security 3 Herman Scobie

Draw a new ERD to reflect the changed requirements.


Show examples of data stored in all the tables generated by your ERD

6. The business narrative for the previous problem has changed again.
The university has a number of bookshops (generally one at each campus).
Each bookshop has a unique ID (such as Hawthorn, Lilydale, Prahran etc) plus a manager
name.

Before the beginning of each semester, each bookshop orders a number of books from
Swinny Press.
The system must record:
• the date of the order
• the qty of books that were ordered
• the date of the books were delivered

Each order has a unique ID number. Only one Book may be ordered on an order.

Sala Publishing wants to be able to produce reports such as this:

Downloaded by qu? anh v? ([email protected])


lOMoARcPSD|9517029

INF10002 Tutorial 8

OrderNo BookShop Book ISBN Date Qty Date Ordered


Ordered Delivered
3001 Hawthorn 1122334455 15 Jan 50 22 Feb
3002 Hawthorn 3031012022 17 Jan 20
3003 Hawthorn 7771117771 17 Jan 100 15 Feb
2410 Lilydale 6060606060 4 Jan 30 30 Jan
2411 Lilydale 1122334455 20 Jan 150
4610 Prahran 6060606060 1 Feb 45

Draw a new ERD to reflect the changed requirements.


Show examples of data stored in all the tables generated by your ERD

Aid Authorname ISBN Title

AUTHOR has AUTHORED has BOOK

OrdNo
OrdDate
BOOKSHOP makes ORDER Qty
DateDelivered

BSID MgrName

7. The business narrative for the previous problem has changed for the final time. Each order
may now contain many requests for many Books

Each bookshop may make an order such as this:


BookShop DateOrdered OrderNo
Hawthorn 7 July 6000

ISBN: Qty

1122334455 60

3031012022 25

7771117771 120

Swinny Publishing wants to be able to produce reports such as this:

OrderNo BookShop Book ISBN DateOrdered Qty Ordered DateDelivered


6000 Hawthorn 1122334455 7 July 60 19 July
6000 Hawthorn 3031012022 7 July 25 25 July
6000 Hawthorn 7771117771 7 July 120

Downloaded by qu? anh v? ([email protected])


lOMoARcPSD|9517029

INF10002 Tutorial 8

Draw a new ERD to reflect the changed requirements.


Show examples of data stored in all the tables generated by your ERD

Downloaded by qu? anh v? ([email protected])

You might also like