Create an appropriate table for each such relation

Assignment Help Database Management System
Reference no: EM132642566

COMP2350 Database Systems - Macquarie University

Database Design and Manipulation

The background knowledge for the assignments is given in the textbook(s), lectures, any other components of the unit, in the prerequisite units ISYS114 or COMP1350, and in the readings provided on ilearn. However, some parts of the assignments may not be answered without prior independent research and/or searching for other sources of information.

This assignment concerns database Database Design and Manipulation. It will be marked out of 100 and will contribute 10% towards your final grade. It consists of normalising some given relation schemas to an appropriate level, implementing those resultant relations employing MySQL, and carrying out some simple data manipulation using those relations.

Problem Context

The context of this Assignment is the same as for Assignment 1, namely the Sydney Library
(SL). This has been reproduced as is in the Appendix for your convenience.

We pretend that your firm had an agreement with SL to design and implement the Database, and the job fell on you. You in turn assigned that task to an intern you are mentoring. The intern has gone through the specification and designed some relational schemas for this purpose. You had a quick look at them, and one of them particularly stood out since it had quite a number of attributes that you suspected should best belong to different relations. The suspect relation schema in question is:

Abnormal_Rel( BookID, BookTitle, Author, Publisher, PubYear, LibBranchID, BranchSuburb, BookStatus, BookPrice, MemberID, MemberName, MemberAddress, MemberExpDate, BookIssueID, DateBorrowed, DateReturned, ReturnDueDate )
Upon discussion with the intern you gathered that the BookID identifies a specific physical volume of book that is housed at a definite branch of SL identified by LibBranchID. A book can be either available or on loan, indicated by the BookStatus value. Whenever a book is issued (loaned) to a member, a new ID is assigned to the transaction related to that book (BookIssueID). For instance, if a member issues borrows five books in one go, five different BookIssueIDs will be generated for those five books.
You took upon yourself to explain to the intern the issue at hand, and how the issue should be addressed. Complete the following tasks in that context.

Task Specifications
You will submit two files on iLearn:
1. Assignment2.pdf. You will first put all your answers to the tasks below (including copying and pasting any SQL code) into a file Assignment2.doc (carefully following the instructions provided), then generate a .pdf file called Assignment2.pdf.
2. Assignment2Code.sql. This is a text file. One way to produce it is first open a new text file called Assignment2Code.txt employing a text editor such as Notepad, WordPad or TextEdit. You will then copy and paste the required SQL codes into it as text. When completed, save it, exit and replace the suffix .txt by the suffix .sql. (There are more efficient ways doing it - this suggestion is provided in case some student does not already know how to do it.)

Task 1
Explain in a short paragraph what non-trivial Functional Dependencies (FDs) are. Identify the non-trivial FDs on the relation Abnormal_Rel. Then identify the Candidate key(s) of Abnormal_Rel.

Task 2
Explain the three forms of Anomalies in three short paragraphs. Determine for each anomaly if the relation Abnormal_Rel is susceptible to that anomaly. Support your determination with a small example.

Task 3
Determine the highest normal form that the relation Abnormal_Rel is in. Then:
1. Normalize/decompose it until you get relations that are in 3NF. Use appropriate illustration to aid the understanding of your work.
2. Check if the resultant relations are in BCNF. If not, decompose them as necessary until you get all of them in BCNF.

Task 4
Now you have a set of relation(s) in BCNF.
1. Create an appropriate table for each such relation (in BCNF), keeping the key constraints in mind. Copy and paste into your .doc document the SQL code you used for this purpose. Also paste into your Assignment2Code text file the same.
2. Insert five rows of (made-up) data into each table. Make sure that the data you enter in these tables should be sufficient to return at least one row for each query in Task
5. For instance, SL should hold at least one copy of the book Anna Karenina by Leo Tolstoy. Copy and paste into your .doc document the SQL code you used for this purpose. Also paste into your Assignment2Code text file the same.
3. Display the content of each table using a SECECT * query. Copy and paste into your
.doc document the result that was displayed.

Task 5
Write SQL queries to answer the following four questions (Q1-Q4). With respect to each,
• Copy and paste into your .doc document the SQL query you used for this purpose. Also paste into your Assignment2Code text file the same.
• Display the result of running this query. Copy and paste into your .doc document the result that was displayed.

[Query 1] List the name of members who have ever borrowed the book with the title
Anna Karenina.

[Query 2] List each member (ID and name) who has books currently overdue against them, together with the ID and title of those books.

[Query 3] List the five most popular book(s) owned by SL. (Interpret this task in a sensible way. If SL has 3 copies of Anna Karenina, we are talking about popularity of the book Anna Karenina, not popularity of its individual copies. Different students are still likely to interpret it differently. Clarify how you "measure" popularity.)

[Query 4] How many books were lent out from SL since Covid-19 related lockdown started (assume it to be March 01, 2020), but have not been returned yet? (In this case, a book means a volume - if two copies of Anna Karenina satisfy this criterion, they should be counted as two books.)

Note: Need only Task 4 and 5.

Reference no: EM132642566

Questions Cloud

How much cash after taxes would andrea receive : How much cash after taxes would Andrea receive from her investment in the first year if SHO is organized as either an LLC or a C corporation?
Review the general idea of corporate wellness : Review the general idea of corporate wellness and the knowledge base underlying its popularity and value. Assess how companies make strategic decisions
Compute the life insurance expense : The entity followed the calendar year as the accounting period. Compute the life insurance expense in 2016, 2017, 2019, and 2020
What is facebook business model : What is Facebook's business model, what strategies it is trying to leverage and how does technology functionality support its strategy?
Create an appropriate table for each such relation : Create an appropriate table for each such relation (in BCNF), keeping the key constraints in mind. Copy and paste into your .doc document the SQL code
What the expected benefits of the training will be : Explain why you chose those areas and what the expected benefits of the training will be for both officers and the community. Include at least four peer.
Compute the total amount to be paid at the expiration : Compute the total amount to be paid at the expiration of each installment with the detail of interest calculation, as well as the total amount
Identify three different types of data : Identify three different types of data that are required to inform your objectives. Which combinations of types of data will work best?
Discuss how organizational culture in an organization : Question - Discuss how organizational culture in an organization can lead to the success or failure of a new system development initiative

Reviews

Write a Review

Database Management System Questions & Answers

  How many books have the type sfi

No computer work is required. How many books have the type SFI?

  Create database for cover 2010 tour de france cycling race

Draw an Entity-Relationship diagram for this database using UML notation. Be sure to include all the entities mentioned above, together with attributes (including primary key attributes).

  Measurement of two lengths in feet and inches

"create a form with textboxes to enter the measurement of two lengths in feet and inches as integer values and compute the total length in feet and inches. For example, the total length of 5 feet 8 inches and 4 feet 6 inches is 10 feet 2 inches; a..

  As a dba it is vital that you understand in detail how a

as a dba it is vital that you understand in detail how a query is processed by the dbms. since team retail is using

  Design a database using professional principle and standards

Design a database using professional principles and standards. Provide a logical design of the database. As a part of the design, normalize the database to the 3NF.

  Plot the data on a scatter plot

Determine the ideal number of clusters. Choose random center points (centroids) for each cluster. Plot the data on a scatter plot.

  Find the eids of employees who make the highest salary

Find the eids of employees who make the highest salary. Find the eids of employees who make the second highest salary.

  Relational algebragiven the following set of relations from

relational algebragiven the following set of relations from the east coast aquarium database list the sequence of

  Why triggers are significant in database systems

What are triggers used for, and why are they significant in database systems? Give an example of situation where a trigger would be appropriate. What would implementation of this trigger look like?

  Sort ascending by consultant id and date opened

Sort ascending by consultant ID and Date Opened. Don't show tickets with category ID of 0. HINT: You will require to use SELECT query with an alias in builder for the column.

  Discuss various activities that you would have to achieve

Using the DBLC, discuss the various activities that you would have to achieve each phase. Assess possible challenges that may exist within each phase.

  Develop a new erm for the current organization

Chapter 12 presented the approach Intuit uses to measure the effectiveness of their ERM, and chapter 15 presented the process the City of Edmonton employed.

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