relationships in the database.

Description

Final Project (100 points)                                                                      Fall 2020/IT 2060

(44 points) Answer questions 1-4 in a Word Document (.rtf, .doc, .docx, .pdf). Write complete sentences with correct grammar and spelling. You will lose points if there are typos or gibberish sentences.

  1. Consider the diagram of a Library database below. There are four relationships in the database. Describe each of the relationships in words, identifying the type of relationship shared between tables and the Foreign key, using the following format:

Customers and Orders have a One-to-Many relationship (FK: CustomerID).
One Customer can make many Orders. One Order can have one Customer.

No other improvisation of the format will be accepted.

  1. (10 points) What would be the SELECT query to join all five tables? You should be able to answer this question based on the relationships and the foreign keys.
  2. (8 points) Consider the table BookInfo. What would be appropriate data types for the following columns: ISBN, BookName, BookPrice and CopiesNo. Explain your choices.
  3. (6 points) Here are some information about the columns in the BorrowInfo table.

Column Name

Data Type

Length

Identity

Allow NULLs

DefaultValue

BorrowID

int

4

Yes

No

No

ReaderNo

int

4

No

No

No

BookCopyID

Int

4

No

No

No

BorrowDate

smalldatetime

NA

No

No

GetDate()

ReturnDate

smalldatetime

NA

No

Yes

BorrowDate + 30 days

ActualReturnDate

smalldatetime

NA

No

Yes

No

Memo

varchar

300

No

Yes

No

Here are some insert statements for this table. Explain why they are invalid or valid.

  1. (Invalid)
    INSERT INTO BorrowInfo VALUES
    (1,234,42, ‘2018/09/14’, ‘2018/10/14’,NULL,NULL)
  2. (Invalid)
    INSERT INTO BorrowInfo VALUES
    (345,‘eight’,‘2018/10/11’, ‘2018/11/10’,NULL,NULL)
  3. (Valid despite skipping columns)
    INSERT INTO BorrowInfo
    ([ReaderNo], [BookCopyID], [BorrowDate])
    VALUES
    (245, 100, ‘2018/11/29’)

(56 points) Answer all the following questions in a .sql file. Use MyGuitarShop Database.

The goal of the following questions is for you to practice writing queries based on all that you have learnt in the course. You will not be given hints on the topic- do you have to use a join or group by or add a where clause or use functions- you have to figure that out. Read the questions, examine the tables and figure out how to write the query based on your knowledge. Some of them are similar to what you have done in homework and in the class.

If not mentioned, use appropriate & meaningful names for all columns. Do not leave any column names blank.
Points will be deducted otherwise.

  1. (20 points) Consider the Addresses and Customers tables.
  2. Write a query to display all the CustomerIDs and their addresses in the following format:

1: 100 East Ridgewood Ave., Paramus, NJ 07652

  1. Write another query to display the Customer Names, IDs and addresses in the following format:

Allan Sherwood, CustomerID: 1, Address: 100 East RidgeWood Ave., Paramus, NJ 07652

It is ok to display multiple addresses for one customer.

  1. Modify the previous query (#b) to show only the billing address. Remember you did something similar in one of the homeworks.
  2. Write a query to display the CustomerIDs that have more than one address, that is, a customer that has one shipping address and a different billing address.
  3. Write another query (which will be a modification of the previous query #d) to display the full names of these customers with more than one address.
  4. (16 points) Consider the Products table
  5. Write a query to display all column information about Products that start with the letters ‘G’ or ‘F’. Sort the result set by ProductName.
  6. Write a query that displays two columns: CategoryID and the number of products in each category. Only show the CategoryID(s) that have more than two products.
  7. Write a query that extracts and displays the first word in the ProductName, which represents the name of the company that manufactures the Product. For example, for the ProductName ‘Gibson Les Paul’, Gibson is the name of the company. Remove any duplicates from the result set.
  8. Write a query to display two columns: the name of the manufacturing company and the number of products produced by it. Show only those companies that have more than one product in the table. You will have to use some code from the previous query (#c).

Calculate the price of your order

Simple Order Process

Fill in the Order Form

Share all the assignment information. Including the instructions, provided reading materials, grading rubric, number of pages, the required formatting, deadline, and your academic level. Provide any information and announcements shared by the professor. Choose your preferred writer if you have one.

Get Your Order Assigned

Once we receive your order form, we will select the best writer from our pool of experts to fit your assignment.

Share More Data if Needed

You will receive a confirmation email when a writer has been assigned your task. The writer may contact you if they need any additional information or clarifications regarding your task

Let Our Essay Writer Do Their Job

Once you entrust us with your academic task, our skilled writers embark on creating your paper entirely from the ground up. Through rigorous research and unwavering commitment to your guidelines, our experts meticulously craft every aspect of your paper. Our process ensures that your essay is not only original but also aligned with your specific requirements, making certain that the final piece surpasses your expectations.

Quality Checks and Proofreading

Upon the completion of your paper, it undergoes a meticulous review by our dedicated Quality and Proofreading department. This crucial step ensures not only the originality of the content but also its alignment with the highest academic standards. Our seasoned experts conduct thorough checks, meticulously examining every facet of your paper, including grammar, structure, coherence, and proper citation. This comprehensive review process guarantees that the final product you receive not only meets our stringent quality benchmarks but also reflects your dedication to academic excellence.

Review and Download the Final Draft

If you find that any part of the paper does not meet the initial instructions, send it back to us with your feedback, and we will make the necessary adjustments.