[SOLVED]>>Use the following information for problems 4 – 10:Tables:PET_OWNER (OwnerID, OwnerLastName, OwnerFirstName, OwnerPhone, OwnerEmail)PET (PetID, PetName, PetType, PetBreed, PetDOB, OwnerID)

 

  • Use the following information for problems 4 – 10:
  • 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:
  • Write an SQL CREATE TABLE statement to create the PET_OWNER table, with OwnerID as a surrogate key. Save as CreatePetOwner.
  • Write a set of SQL INSERT statements to populate the PET_OWNER table with the data given above. Save as PopulatePetOwner.
  • Write an SQL CREATE TABLE statement to create the PET table, with PetID as a surrogate key. Save as CreatePet.
  • Write a set of SQL INSERT statements to populate the PET table with the data given above. Save as PopulatePet.
  • Write an SQL statement to display the breed and type of all pets. Save as AllBreeds.
  • Write an SQL statement to display the breed, and DOB of all pets having the type Cat. Save as Cats.
  • 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.
  • 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.
  • Write an SQL statement to display the total number of pets. Save as TotalPets.
  • 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.
  • Write an SQL statement to count the number of distinct breeds. Save as NumberOfBreeds.
  • Write an SQL statement to display the names of all the dogs. Save as Dogs

 

Order This Solution

Ask your homework question

 

INDIVIDUAL APPROACH:
Chat with every writer who applies to your request, and view their skills and portfolio. Make the choice that’s right for you.
MANAGE YOUR ORDER:
Monitor progress and see any changes made. Have full control over every phase of the process.
COMMUNICATE:
Ask your writer questions and provide your ideas about your paper. Produce the exact result that you want.
ENJOY THE OUTCOME:
Get everything done on time with high quality. Writing papers is much simpler with us.

Ask your homework question

 

© 2017 theacademicessays. All Rights Reserved. Design & Developed by theacademicessays.
Loading...