Professional Documents
Culture Documents
Assignment 2
Overview
For this assignment you will implement and query a database from a supplied ER
Diagram and Schema. You will be required to write the SQL statements to create
the database structures, to fill the database with data and to run queries on the
data.
Assessment Details
Books For Everyone (BFE) is a company that sells books and e-books. The
company has provided you with a standard solution for the conceptual data model
(the ER diagram). You have been commissioned to continue your role (in your
capacity as a Database Management System consultant) and to write the SQL
statements to create the database and its tables, add data, and provide answer to
some of their everyday queries. The database should be created based on the ER
diagram provided at the end of this document. Some sample data are also
provided to be used for inserting data to tables. You are required to insert
sufficient data to test the reports given below.
REVIEW authorID
name
CATEGORY country
REVIEWER
reviewerID bio
reviewerID inventoryID
reviewText categoryID
name name
email reviewDate
description
avatar
customer
WRITTEN-BY
authorID
inventoryID
INVENTORY role
inventoryID
category
title
abstract
yearPublished
unitPrice WHOLESALER
wholesalerID
name
contactName
BOOK phone
email
E-BOOK-TYPE E-BOOK inventoryID address
wholesaler suburb
ebookTypeID inventoryID qtyInStock postcode
fileType EBookType
description country
comments
CUSTOMER
ORDER-LINE
ORDER
customerID
firstName orderID
orderID inventoryID
lastName
customerID quantity
phone
dateOrdered amount
email
dateFulfilled
address
postageAmount
suburb
discountApplied
postcode
loyaltyDiscount
CATEGORY
REVIEWER
name description Name email customer
Cooking Cookbooks, food and Anna Anna.coulter@bigpond.com.au
beverage encyclopedias Coulter
Sports Sports documentaries, Peter ptock@students.mit.edu.au
biographies and stories Tock
Children Books for all age groups to Toby tobymcm@westnet.net 6
15 McMillan
Science Fiction Deirdre thehappyreader55@gmail.com
Crime Fiction Castle
History Historical research and Jerry Fong jerryfong@iinet.net.au
ancient book reprints Jet Tila Jet747@gmail.com
General Fiction Any other fiction
Academic School, college, university
books
Health &
Wellbeing
Science Popular Science
Wholesaler
Name Contact Phone Email Address Subur Postco Country Comments
b de
Tuggerano Jack Pratt 02 6606 sales@tugbooks.com. 1 Jones St Tugge 2601 Australia Good prices on
ng 1458 au ranon health books
Bookbarn g
Mega James +6135555 sales@megatainment. 32 East St Perth 6140 Australia
Books McGrath 1549 com
Sporting Nadine 04487899 sales@sportingworld. 8 North Auckl 1141 New Christmas orders
World McMaster 87 co.nz Road and Zealand by December 10
Rare Books Steven 07516729 s.saunder@rarebooks 15 Albury Cabra 2166 Australia
Saunders 24 .com.au Street matta
Premiere Jodie 06571683 info@premierebooks. 1548 Glenfi 2167 Australia
Books Vaughn 42 com Hume Hwy eld
Book Peter +4107529 sales@book- 15 Boulos Lond 9911 UK Recalculate VAT
Magic Buttler 817 magic.co.uk Parade on
VIC Rupert 04985284 rb@vicentertainment. 62 Kew 3056 Australia Great Fiction
Entertainm Ballinger 17 net.au Yellowston selection
ent e Ave
Monsoon Doris +1174019 sales@monsoon.com 3 Lexin 78428 USA Minimum order
Books & Mackenzie 841 Ironworks gton $500 USD
Films Turnpike
E-Book Type
File Type Description
PDF Portable document format –
all devices
Kindle Kindle device, also readers
Audiobook
HTML Online only
CUSTOMER
First Last Phone Email Address Suburb Post- Loyalty
name Name code Discount
John Brigg 53159510 JohnnoBrigg@gmail.com 1 Bells Road Napoleons 3352 1.3%
Joe Summers 45613208 jsummers@yahoo.com 52 Main St Maryborough 3465
Sam deWinter 12356713 winter@xyz.net.au 2156 Skipton Sebastopol 3356
Rd
Mary Donald 13265413 flowers58@iprimus.com 98 Neil St Cressy 3373
Sally Fall 15626543 autumn@gmail.com 65 Commercial Clunes 3370 2.5%
St
Toby McMillan 040853185 tobymcm@westnet.net 65 Crest Ave Ballarat 3353
Pat Jones 049513572 patsyJ@anet.com.au 46 Wattle Ave Wendouree 3355 2.5%
Dick Matthews 21356467 d.matthews@mynet.com 7 Hepburn Daylesford 3460
Springs Blvd
Tommy Jones 51657896 whereistom@gone4good. 1254 Sturt St Ballarat 3353 4%
com
Barry McKenzie 32165489 bazza@adventure.com 47 Gillies St Ballarat 3350
AUTHOR
First Name Surname Country Bio Books written
Ina Garten UK In 1978, Ina Garten left her job as a budget analyst in 1 (author)
the White House to pursue her dream of operating a
specialty food store in the Hamptons. She is a frequent
2 (author)
contributor to major national magazines and writes a
recurring column in O Magazine.
Jack L. Chalker USA No info available 5 (author)
6 (author)
Stephen Hawking USA Stephen Hawking's ability to make science understandable 3 (author)
and compelling to a lay audience was established with the
4 (author)
publication of his first book, A Brief History of Time, which
has sold nearly 10 million copies in 40 languages.
Vera Brosgol USA No info available 7 (illustrator)
INVENTORY
ID Title Cat. Unit abstract Year Quantity in Whole- E-book
Price published Stock (Book) saler type
(Book) (E-Book)
1 Cooking 1 $21.38 Ina’s most personal cookbook 2016 5 2 n/a
yet, Cooking for Jeffrey is
for Jeffrey
filled with the recipes Jeffrey
and their friends request most
often as well as charming
stories from Ina and Jeffrey’s
many years together.
2 Barefoot in 1 $24.79 Hearty boeuf Bourguignon 2004 8 2 n/a
served in deep bowls over a
Paris
garlic-rubbed slice of baguette
toast; decadently rich croque
monsieur, eggy and oozing
with cheese; gossamer crème
brulee, its sweetness offset by
a brittle burnt-sugar topping.
Here is the book that helps
you bring that spirit, those
evocative dishes, into your
own home.
3 A Brief 10 $14.00 A landmark volume in 1998 10 2 n/a
science writing by one of
History of the great minds of our time,
Time Stephen Hawking’s book
explores many profound
questions.
4 The Grand 10 $10.00 A landmark volume in science 2012 n/a n/a Kindle
writing by one of the great
Design
minds of our time, Stephen
Hawking’s book explores
many profound questions.
5 Midnight 4 $14.99 Midnight at the Well of Souls 2014 5 7 n/a
is the first book set in the Well
at the Well
World universe.
of Souls
6 The Sea Is 1 $7.99 This exciting, action-packed 1999 4 7 n/a
novel marks Jack Chalker's
Full Of
triumphant return to his
Stars celebrated multivolume saga:
The Well World. The Sea Is
Full of Stars explores an
unknown interstellar
civilization.
7 Leave Me 3 $10.33 One day, a grandmother 2016 16 3 n/a
shouts, "LEAVE ME ALONE!"
Alone!
and leaves her tiny home and
her very big family to journey
to the moon and beyond to
find peace and quiet to finish
ORDER
ID Customer Date Ordered Date Fulfilled Postage Disc.Applied Order-lines
(inventory id,
quantity, amount)
1 1 18/1/2017 19/1/2017 - 1.3% 1, 1, $21.38
8, 1, $6.00
2 6 15/12/2017 18/12/2017 $5.50 - 3, 1, $14
3 2 1/9/2017 6/9/2017 $9.50 - 7, 2, $10.33
9, 1, $9.90
4, 1, $10
4 5 11/10/2017 13/10/2017 $9.50 2.5% 1, 1, $21.38
5 3 1/12/2017 3/12/2017 $9.50 10% 1, 1, $19.24
6 6 8/1/2018 - - 4, 1, $10
7 4 5/6/2017 10/6/2017 $9.50 - 1, 1, $21.38
2, 1, $24.79
6, 1, $7.99
8 7 3/1/2018 $5.50 - 5, 1, $14.99
9 8 28/5/2017 30/5/2017 $5.50 - 8, 1, $6.00
3, 1, $14
10 9 7/10/2017 7/10/2017 - 4% 4, 1, $10
Feedback
Feedback will be provided via the marked rubric with comments handed out in the tutorial 2 weeks
after the submission date. The marks will also be available on FDL Marks at this time.
Plagiarism
Plagiarism is the presentation of the expressed thought or work of another person as though it is
one's own without properly acknowledging that person. You must not allow other students to copy
your work and must take care to safeguard against this happening. More information about the
plagiarism policy and procedure for the university can be found at
http://federation.edu.au/students/learning-and-study/online-help-with/plagiarism.