Current loans of books to borrowers

Assignment Help Other Subject
Reference no: EM132133117

Assignment

Case Study

The local Monash Municipality maintains several libraries for its residents across the municipality.

For each branch, Monash Library Services assigns a branch code (an incremental number for each branch with the first branch using a code of 10). The branch name, address and contact phone number are also recorded. Each branch is assigned a manager and has a unique phone number.

Due to the small size of some of the branches, a particular manager may manage several branches. Each manager is assigned a manager id. Monash Library Services record a manager's name and contact phone number.

Monash Library Services maintain records of current loans of books to borrowers.

Each borrower is identified by a unique borrower number. When a borrower first registers to borrow books, the branch where they register is recorded as their home branch. The name and address of each borrower is held so that communications, such as overdue loan reminders, can be sent when necessary.

The information held about a book includes its Dewey Decimal call no - this call no is used to identify a particular books details. The title, author's name/s, publisher's name, publication year, purchase price, classification (Reference or Fiction), number of pages and edition, if applicable, are recorded. Each publisher can be assumed to have a unique name. A given book may be written by a number of different authors, however, the library regards a book as only being published by a single publisher. The library assigns its own unique in-house numerical codes to identify authors and publishers.

A book may cover a number of different subjects which the library wishes to record so that borrowers can use an online catalogue system to select books by subject as well as title and author's name.

Branches hold copies of a book - each copy is the property of a particular branch and is identified by the branch number and a branch assigned local id number (these id numbers are repeated at each branch). Some book copies are placed on counter reserve, and are not available for loan - they may only be used in the library. A flag is added to a book copy to indicate if it is on counter reserve or not. There may also be other copies of the same title which are available for normal loan.

When a book copy is borrowed (goes out on loan), the return date is recorded. A record of all loans which take place is maintained. When a book is returned from a loan its actual return date is recorded. Each book copy can be loaned for exactly 4 weeks and must then be renewed to avoid a fine.

Borrowers may reserve books currently out on loan. The date and time on which the reserve was placed are recorded. A given book may be reserved by several borrowers, the book is made available based on the order in which the reserve was placed by the borrower.

When a borrower returns a book, they may if they wish renew their loan and take the book out for a further loan period provided the book has not been reserved by another borrower, the renewal is simply treated as a new loan for that borrower. Books must be returned to the branch from which they were borrowed (the branch owning the book copy).

In completing this assignment you are not permitted to manually:
- lookup a value in the database, obtain its primary key or highest or lowest value in a column, or
- calculate values external to the database eg. on a calculator and use such values in your answers.

You may ONLY use the data provided in the text of the questions.

As an example, say you were asked to find the name of the publisher for the book titled "Harry Potter and the Cursed Child" - you cannot look in the BOOK_DETAIL table and find the pub_id for the publisher of this book (say 100), and then use the value 100 directly to find the pub_name from the PUBLISHER table. Here you can only use the text you were given "Harry Potter and the Cursed Child".

Your answers must recognise the fact that you have been given, with the supplied insert file, only a small sample snapshot of a multiuser database, as such you must operate on the basis that there will be more data in all of the tables of the database than you have been given. Your answers must work regardless of the extra quantity of this extra "real" data and the fact that multiple users will be operating in the tables at the same time. You must take this aspect into consideration when writing SQL statements.

TASK 1: Data Definition

For this task you are required to complete the following:

Add to your solutions script, the CREATE TABLE and CONSTRAINT definitions which are missing from the FIT9132_2018S2_A2_Schema_Start.sql script. You MUST use the relation and attribute names shown in the data model above to name tables and attributes which you add.

Add the full set of DROP TABLE statements to your solutions script. In completing this section you must not use the CASCADE CONSTRAINTS clause as part of your DROP TABLE statement (you should include the PURGE clause).

Before proceeding with Task 2, you must run the file FIT9132_2018S2_A2_Schema_Start.sql (which must not be altered in any way) followed by the extra definitions that you added in 1.1 above.

TASK 2: Data Manipulation

Run the script FIT9132_2018S2_A2_Insert_Start.sql to add some initial data into the tables you have created so far.

For this task you are required to complete the following sub-tasks in the same order they have mentioned:

MonLib has just purchased its first 3 copies of a recently released edition of a book. Readers of this book will learn about the subjects "Database Design" and "Database Management".
Some of the details of the new book are: Call Number: 005.74 C822D 2018
Title: Database Systems: Design, Implementation, and Management
Publication Year: 2018
Edition: 13 Publisher: Cengage
Authors: Carlos CORONEL (author_id = 1 ) and Steven MORRIS (author_id = 2)
Price: $120

You may make up any other reasonable data values you need to be able to add this book.

Each of the 3 MonLib branches listed below will get a single copy of this book, the book will be available for borrowing (ie not on counter reserve) at each branch:

Caulfield (Ph: 8888888881) Glen Huntly (Ph: 8888888882) Carnegie (Ph: 8888888883)

Your are required to treat this add of the book details and the three copies as a single transaction.

An Oracle sequence is to be implemented in the database for the subsequent insertion of records into the database for BORROWER table.

Provide the CREATE SEQUENCE statement to create a sequence which could be used to provide primary key values for the BORROWER table. The sequence should start at 10 and increment by 1.

Provide the DROP SEQUENCE statement for the sequence object you have created in question 2.2 above.

TASK 3:

The sequence created in task 2 must be used to insert data into the database for the task 3 questions. For these questions you may only use the data supplied in this task.

You must correctly manage transactions with these tasks.

For this task you are required to complete the following sub-tasks in the same order they have been mentioned:

Today is 20th September, 2018, add a new borrower in the database. Some of the details of the new borrower are:

Name: Ada LOVELACE
Home Branch: Caulfield (Ph: 8888888881)

You may make up any other reasonable data values you need to be able to add this borrower.

Immediately after becoming a member, at 4PM, Ada places a reservation on a book at the Carnegie branch (Ph: 8888888883). Some of the details of the book that Ada has placed a reservation on are:

Call Number: 005.74 C822D 2018
Title: Database Systems: Design, Implementation, and Management Publication Year: 2018
Edition: 13

You may assume:
- MonLib has not purchased any further copies of this book, beyond those which you inserted in Task 2.1
- that nobody has become a member of the library between Ada becoming a member and this reservation.

After 7 days from reserving the book, Ada receives a notification from the Carnegie library that the book she had placed reservation on is available. Ada is very excited about the book being available as she wants to do very well in FIT9132 unit that she is currently studying at Monash University. Ada goes to the library and borrows the book at 2 PM on the same day of receiving the notification.

You may assume that there is no other borrower named Ada Lovelace.

TASK 4

For this task you are required to complete the following sub-tasks.

After using the system for some time, MonLib has realised that it is necessary to Record whether a book is damaged (D) or lost (L). If the book is not damaged or lost,then it is good (G) which means, it can be loaned. The value cannot be left empty for this. Change the "live" database and add this required information for all the books currently in the database. You may assume that condition of all existing books will be recorded as being good. The information can be updated later, if need be.

Allow borrowers to be able to return the books they have loaned to any library branch as MonLib is getting a number of requests regarding this from borrowers. As part of this process MonLib wishes to record which branch a particular loan is returned to. Change the "live" database and add this required information for all the loans currently in the database. For all completed loans, to this time, books were returned at the same branch from where those were loaned.

Some of the MonLib branches have become very large and it is difficult for a single manager to look after all aspects of the branch. For this reason MonLib are intending to appoint two managers for the larger branches starting in the new year - one manager for the Fiction collection and another for the Non-Fiction collection. The branches which continue to have one manager will ask this manager to manage the branches Full collection. The number of branches which will require two managers is quite small (around 10% of the total MonLib branches). Change the "live" database to allow monLib the option of appointing two managers to a branch and record, for all managers, which collection/s they are managing.

In the new year, since the Carnegie branch (Ph: 8888888883) has a huge collection of books in comparison to the Caulfield and Glen Huntly branches, Robert (Manager id: 1) who is currently managing the Caulfield branch (Ph: 8888888881) has been asked to manage the Fiction collection of the Carnegie branch, as well as the full collection at the Caulfield branch. Thabie (Manager id: 2) who is currently managing the Glen Huntly branch (Ph: 8888888882) has been asked to manage the Non-Fiction collection of Carnegie branch, as well as the full collection at the Glen Huntly branch. Write the code to implement these changes.

Attachment:- Introduction to Databases.rar

Reference no: EM132133117

Questions Cloud

What is the beta for bmg : You have observed the following returns over time: What is the beta for BMG?
Calculate the payment required : Calculate the payment required in 16 months for the rescheduled option to settle the loan if money earns 5.60% compounded monthly during the above periods.
Afford on a 60-month apr loan : You can afford to make monthly payments of $750, but no more. Assuming monthly compounding, what is the highest rate you can afford on a 60-month APR loan?
Determining the net present value : Net present value: Riggs Corp. management is planning to spend $650,000 on a new marketing campaign.
Current loans of books to borrowers : FIT9132 Introduction to Databases - create a sequence which could be used to provide primary key values for the BORROWER table. The sequence should
Probability distribution for the number of machines : If you wanted to use a probability distribution for the number of machines that break down on a given day, would you use the binomial or Poisson distribution
What did phillips record as equity income : If Phillips uses the Equity Income method, what did Phillips record as Equity Income on its 2007 income statement?
What is the minimum number of shares : The shareholders of a company need to elect six directors and there are 150,000 shares outstanding.
What is the present value of a security : What is the present value of a security that will pay $9,000 in 20 years if securities of equal risk pay 12% annually? Round your answer to the nearest cent

Reviews

Write a Review

Other Subject Questions & Answers

  Describe process of organizational development recognize

prepare a 350 to 700-word paper in which you examine the concept of organizational development. be sure to address the

  What can one person do to make a difference on this issue

Consider the scope of what you have learned regarding your social issue. What insights have resonated? What inspiration have you drawn from examples in the Learning Resources? What can one person do to make a difference on this issue? What can man..

  Relationship between wealth and talent to be compelling

Do you find Walzer's analysis of the relationship between wealth and talent to be compelling? Why or why not?

  Hypothesis test produces a z-score in the critical region

If a hypothesis test produces a z-score in the critical region, what decision should be made?

  How many units can he buy

Consider a consumer who saves $10,000 in 2013 at the nominal interest rate given above. After one year, he withdraws all the money from the bank and spent the entire amount on the commodity. How many units can he buy?

  A group''s access to resources it needs for survival?

a group's access to resources it needs for survival?

  Write essay about level of social services provided in texas

Write a 2 page essay about the level of social services provided in Texas. Explain the TANF and SNAP programs. Discuss the tradeoff between the higher taxes that would be required.

  Construct an argument supporting your proposed solutions

Construct an argument supporting your proposed solution(s). Be sure to consider multiple disciplines or populations so that your solution shows that multiple parts of society will benefit from this solution.

  Elaborate on what the textbook authors mean

Elaborate on what the textbook authors mean when they say that most European countries have “divorced America.” Explain the main reasons Europe has withdrawn from a close relationship with the U.S.

  What is your opinion about the practice issue

What is your opinion about the practice issue? Does educational preparation at the diploma, associate, or baccalaureate level result in differences in practice?

  State and federal governance of health care

What are the arguments for and against state versus central (federal) governance of health care? Please provide references.

  What is the first exterior finish that should be estimated

What is the first exterior finish that should be estimated? Assuming that the floor joists are set on a 16" centers, how may joists are needed for a floor that is 49 feet long? The term R-Value is ued with regards to ____

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd