Answered Essay: Problem Domain This case study deals with a system used by a bookshop chain, known as Sydney Book House (SBH). The

Problem Domain This case study deals with a system used by a bookshop chain, known as Sydney Book House (SBH). The information to be stored in the system includes four major categories of data: branch information about SBH, author information, book information, and publisher records. Information about employees of SBH and other relevant data are also stored in the system.

A. Branch Information: SBH has several branches all over Sydney. The system shall contain a branch name, an ID number, address and number of employees working at that branch.

B. Author Information: The system shall contain a list of author identifiers along with author name and author email address.

C. Book Information: The system shall contain a list of unique book identifiers including book title, book type (e.g. fiction, history, education), price of that book and whether it is paperback or not (yes/no). The following business rules are operative: 1. Each book is published by a publisher who is listed in the system. A publisher may or may not have published any books. 2. Each book must be written by at least one author. There may exist multiple authors for a book, in which case, the author sequence must be maintained as in the cover page of the book. Of course, an author can write many books or she might be waiting to publish her first work. 3. In addition, the system must keep track of the number of copies available of each book per branch of SBH. A branch may have many copies of a particular ISYS224, 2017.S2 Page 3 book in stock (possibly none).

D. Publisher Information: The system shall contain information about publishers. Each publisher must have an identifier which is a unique code of three alphanumeric characters, publisher name, city and contact number. As noted earlier, a publisher may have published many books (possibly none).

E. Employee Information: The system shall contain a record of all employees who work at SBH. Each employee has a unique eight (alphanumeric) character long identifier, name, employee-type (e.g. permanent, contractual, casual etc.). Each employee must report to a supervisor who is also an employee of SBH. F. Working Shift Information: The system shall contain a list of working shift identifiers including the week day (Monday-Sunday), start time, end time and type of duty (e.g. cleaning, sales, security). The management maintains a duty roster for employees specifying who works on which working shift each week. Since employees prefer to have weekends off, SBH has a policy that no employee is allocated working shift for consecutive weekends.

G. Auxiliary Information: Some branches of SBH are located at more popular locations in the city and attract more customers than others. Therefore, the management has decided to roster employees to work at different branches so that workloads of different employees are better balanced. However, the standard hours of work for an employee are 7 hours a day (35 hours a week). Also, no employee is scheduled to work in more than one branch in a given week.

Construct an ER diagram in Workbench (starting with the incomplete sample provided) for the SBH database. You may need to introduce additional entities and relationships to capture the data requirements of SBH. You must include attributes, their appropriate data types and define identifiers for each entity in the process. You will also need to implement appropriate referential integrity constraints.

Expert Answer

 

SQL Queries:

a) Find the book title and price of historical books.

Query: select booktitle,bookprice from book where booktype=”history”;

Result:Screenshot

b) Find the name and email address of all authors who wrote at least one fiction but no historical book.

Query: select A.authorname,A.authoremailaddress from author A  left join book B on A.authorid=B.authorid
where B.booktype=”fiction” and not B.booktype =”history” group by A.authorname
having count(B.booktype)>=1

Result:Screenshot

c) Find the total number of books published by each publisher.

Query:select P.publisherid,count(B.bookId) as “Total number of books” from book B left join publisher P
on P.publisherid=B.publisherid group by P.publisherid

Result screenshot:

Buy Essay
Calculate your paper price
Pages (550 words)
Approximate price: -

Help Me Write My Essay - Reasons:

Best Online Essay Writing Service

We strive to give our customers the best online essay writing experience. We Make sure essays are submitted on time and all the instructions are followed.

Our Writers are Experienced and Professional

Our essay writing service is founded on professional writers who are on stand by to help you any time.

Free Revision Fo all Essays

Sometimes you may require our writers to add on a point to make your essay as customised as possible, we will give you unlimited times to do this. And we will do it for free.

Timely Essay(s)

We understand the frustrations that comes with late essays and our writers are extra careful to not violate this term. Our support team is always engauging our writers to help you have your essay ahead of time.

Customised Essays &100% Confidential

Our Online writing Service has zero torelance for plagiarised papers. We have plagiarism checking tool that generate plagiarism reports just to make sure you are satisfied.

24/7 Customer Support

Our agents are ready to help you around the clock. Please feel free to reach out and enquire about anything.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

HOW OUR ONLINE ESSAY WRITING SERVICE WORKS

Let us write that nagging essay.

STEP 1

Submit Your Essay/Homework Instructions

By clicking on the "PLACE ORDER" button, tell us your requires. Be precise for an accurate customised essay. You may also upload any reading materials where applicable.

STEP 2

Pick A & Writer

Our ordering form will provide you with a list of writers and their feedbacks. At step 2, its time select a writer. Our online agents are on stand by to help you just in case.

STEP 3

Editing (OUR PART)

At this stage, our editor will go through your essay and make sure your writer did meet all the instructions.

STEP 4

Receive your Paper

After Editing, your paper will be sent to you via email.

× How can I help you?