PET OWNER (Ownerid, Ownerlastname, Ownerfirstname, Ownerphone, Owneremail)

PET OWNER (Ownerid, Ownerlastname, Ownerfirstname, Ownerphone, Owneremail)

  1. Tables:

PET_OWNER (OwnerID, OwnerLastName, OwnerFirstName, OwnerPhone, OwnerEmail)

PET (PetID, PetName, PetType, PetBreed, PetDOB, OwnerID)

**Note: OwnerID is italicized to indicate the Foreign Key**

Data:

figure 1

  1. Write an SQL CREATE TABLE statement to create the PET_OWNER table, with OwnerID as a surrogate key. Save as CreatePetOwner.
  2. Write a set of SQL INSERT statements to populate the PET_OWNER table with the data given above. Save as PopulatePetOwner.
  3. Write an SQL CREATE TABLE statement to create the PET table, with PetID as a surrogate key. Save as CreatePet.
  4. Write a set of SQL INSERT statements to populate the PET table with the data given above. Save as PopulatePet.
  5. Write an SQL statement to display the breed and type of all pets. Save as AllBreeds.
  6. Write an SQL statement to display the breed, and DOB of all pets having the type Cat. Save as Cats.
  7. Write an SQL statement to display the first name, last name, and email of all owners, sorted in alphabetical order by last name. Save as AlphaOwners.
  8. Write an SQL statement to display all the owners’ names, with the first name in all lower case and the last name in all upper case. Save as UpperLower.
  9. Write an SQL statement to display the total number of pets. Save as TotalPets.
  10. Write an SQL statement to display the last name, first name and email of any owner who has a NULL value for OwnerPhone. (Note: there should be one owner who has a NULL value for OwnerPhone.) Save as PhoneNull.
  11. Write an SQL statement to count the number of distinct breeds. Save as NumberOfBreeds.
  12. Write an SQL statement to display the names of all the dogs. Save as Dogs.

Part A: Write a 500-1000 word paper using Word discussing NoSQL. Use at least two sources outside your text and course material for this paper.Do not use Wikipedia. Use APA format for the paper, and be sure to cite all your sources using APA format. Submit your Word document for grading.

Part B: Use the Week 3 Assignment Pet_Database File for this section of the assignment. In the PET table, delete the PetDOB field and add a numeric PetCost field. Populate this field with appropriate values. Save the changes to the PET table. Create SQL queries to do the following:

  • Display the last name and phone number of all dog owners. Use a subquery to do this.
  • Display the first and last name of owners and the type of animal of all unknown breeds.
  • Display the pet name and owner last name of all dogs.

Save all 3 queries.

Export the PET table to an Excel spreadsheet. Create a Pivot table. Have the cost display as currency. Take screen shots* of two different views without a report filter and paste the screen shots into a Word document. Then add a report filter and choose one value for it, take a screen shot, then choose a different value for the same filter and take another screen shot. Paste those into the Word document containing the first two screen shots. You should now have 4 screen shots in this Word document. Save the Word document as Screen shots. Save the pivot table as Pivot.

You will have 4 files submitted for this assignment: the Word document with your paper from Part A, the Microsoft Access Pet_Database file, the Screen shots Word file, and the Pivot file.

*To take a screen shot, have the proper information on your screen, hit the PrntScr button, and then paste into the Word document.