What is the title of the book with the second lowest price

Assignment Help Database Management System
Reference no: EM132373104

Database Systems Assignment - Software Application

Bookstore Database - The MPBookstore database gathers and organizes information about branches, publishers, authors, and books. There are six tables in the database.

Publisher: This table stores the publisher of the book, and the publisher's city and state of origin. (publisher_code is the Primary Key)

Book: This table contains Information about books, including the title for the book, the publisher of the book, the publishing date, the price. (book_code is the Primary Key and publisher_code is the Foreign Key)

Author: This table accommodates the information about authors. The table only contains the author's first name and last name, but other information, such as the author's age and nationality can be added. (author_no is the Primary Key)

Branch: This table stores the information about the each branch of the bookstore and their details about what is the branch name and where it is located. (branch_no is the Primary Key)

Wrote: This table contains the association between books and authors as one book can be written by more than one author. It is used to relate books and authors. The Sequence field indicates the order in which the authors of a particular book are listed on the cover

Author_no in Author and Author_number in Wrote , both store author_no values (book_code,Author_number is the Composite Primary Key. book_code and Author_number are the Foriegn Keys)

Invent(inventory) : This table contains the association between books and branches. It is used to indicate the number of copies of a particular book that are currently on hand at a particular branch. Which book is available at which branch and how many copies of the book are at each branch of the bookstore.

Tasks -

Question 1 - Consider the ER Diagram given above; build the application using SAS PROC SQL

PART A - Import all data from import document (Download it from Moodle) into SAS Studio to run the queries in Question 2.

PART B - Write SQL statements to for following

a) Use an update query to change the price of any book in the Fiction (FIC) with a current price of 3.95 to 5.50.

b) Use a delete query to delete all books in the SFI type table that have the publisher code BB.

Question 2 - Manipulate the data with the database you have created in Question 1 and perform the following queries:

PART A -

1. Retrieve all the data in the Author table.

2. Retrieve the book price for the Book "Stranger".

3. List all the books in alphabetical order (ASC) and price greater than $5.50.

4. List the name of every publisher not located in New York.

5. List all the different book types. Avoid duplicates.

6. List the book code and title of every book that has the type FIC, MYS or ART.

PART B -

1. List all the branches with No of employees in range of 10 and 15.

2. Find all publishers with "'t" in their name.

3. Find all books with "Databases" in their title.

4. List the authors who published "Higher Creativity".

5. List the books of the publishers who located at "NY".

6. List all books with their authors (full name).

7. What is the max and min "units on hand" out of all books.

8. List the publications of author "Christie Agatha".

9. List the book code and title of every book that has the type "FIC" or that has the publisher code "BB".

10. Calculate the average price for each type of book.

11. For every book published by "Addison Wesley", list the book title and book price.

12. Members get a 10% discount off regular book prices. To determine the discounted prices, calculate the discounted price of every book. (It can be calculate 90% of the current price, or calculate the difference of the current price and 10% of current price.).

PART C -

1. How many books do each author wrote?

2. List the book titles of all books that are held at the "Henrys Downtown" branch. Use nested queries only ie. no table joins.

3. What is the title of the book with the second lowest price? List the book title and price.

4. Which Book has the second highest availability (units on hands) in the table?

5. Which Book is not available at "Henrys Brentwood"

6. List the publishers (and the number of books they published) who have published 10 or more books.

7. Identify the authors who are wrote more than 3 books and which locations their books are available?

8. For all book types contains more than 5 published books, display the earliest publish dates for each book type.

The set textbooks for reference are:

1. Rob, P, Coronel, C & Morris, S 2016, Database systems: design, implementation and management, 12th edn, Course Technology, ISBN-13: 9781305627482.

2. Lafler, Kirk Paul 2013, PROC SQL: Beyond the Basics Using SAS®, 2nd edition, Cary, NC: SAS Institute Inc.

Attachment:- Database Systems Assignment File.rar

Reference no: EM132373104

Questions Cloud

Summarize the most impactful external opportunities : Summarize the most impactful external opportunities and threats that have recently affected MCM.
Name the key stakeholders you will consult : Name the key stakeholders you will consult when developing the policy. How will you explain the benefits of the policy to them?
How the outcomes might have changed : P ost a brief summary of the research article you selected, including an identification of the treatment outcome model used in the study. Then explain how.
Application and service integration : ICT321 - Architecture and System Integration - University of Sunshine Coast - you will be able to type a journey name into the input and retrieve a passenger
What is the title of the book with the second lowest price : BIT231 Database Systems Assignment - Software Application, Melbourne Polytechnic, Australia. What is the title of the book with the second lowest price
How you will apply that learning in your daily life : Describe how you will apply that learning in your daily life, including your work life. Describe what may be unclear to you, and what you would like to learn.
Referring to the ontario fault determination rules : 1. Referring to the Ontario Fault Determination Rules start by determining fault in this scenario.
Distinction between customer satisfaction and customer loyal : The Quality Director must identify the changes needed to improve customer satisfaction and loyalty but also maintain financial stability.
Identify the different types of reinforcements : Identify the different types of reinforcements. How do these types enhance learning?

Reviews

len2373104

9/19/2019 10:48:50 PM

Assignment Instructions: Use last 2 digits of your student id as part of table and attributes name. e.g. TableNamexx where xx are the digits of your user id. List all the assumptions made. The word document should contain a. Question No b. SQL Code c. Screen shot of execution of SQL code on SAS Studio. Save all the SAS PROC SQL code in one txt/sql file and submit it with the submission. TXT/SQL file - Your SAS PROC SQL code must run without errors apart from those errors resulting from table and drop sequence commands for the tables and sequences that have not as yet been created. 5 marks will be deducted for each error.

len2373104

9/19/2019 10:48:42 PM

Submission Instructions: Submit on Moodle: Submit 2 files on Moodle, A Word document, A SQL/TXT file contains SAS PROC SQL code that runs on SAS Studio and a cover sheet with your student Id and Name. Late Submission - Late submission of assignments will be penalised as follows: For assignments 1 to 10 days late, a penalty of 5% (of total available marks) per day. For assignments more than 10 days late, a penalty of 100% will apply. Which means, the assignment will not be marked and attract a fail grade. Your submission must be compatible with the software (PDF/Word/Video/Zip) in Melbourne Polytechnic, Computer Laboratories/Classrooms.

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

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