How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask TheDoctor Your Own Question

TheDoctor
TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1757
Experience:  M.S. in Internet Information Systems
59032869
Type Your Homework Question Here...
TheDoctor is online now
A new question is answered every 9 seconds

Given an existing multitable third normal form (3NF) database,

This answer was rated:

Given an existing multitable third normal form (3NF) database, generate SQL code to answer a series of questions requiring you to demonstrate your knowledge of comparison operators, nested and correlated nested queries, inner and outer joins, views, and aggregate functions. Combine all your queries into a single SQL script, making sure that the script runs without errors before submitting it through WebTycho by the due date. Also, provide the results of running your script with the SQL*Plus spool command.
Hello again, Bill! Thank you for requesting me.

Do you have an existing database for this assignment? You can upload files to http://ge.tt

Once uploaded, you will be given a link on the right. Click on the 'Copy Link' option and paste it here.

Thank you
Customer: replied 3 years ago.

actually, no I do not have an existing database.

So this assignment can be accomplished with any Oracle database in the world? There is no specific database that your instructor wants you to use?
Customer: replied 3 years ago.

The following link is what is supposed on the database you mentioned. Unfortunately, I do not have it pre-made to send you to use.


http://www.datafilehost.com/download-0696373a.html

Hello again, Bill.

In order to complete the assignment, I would need to write all of the create tables for the many required tables. Then I would have to write multiple insert statements for every single table. Only then could I work on writing queries. This is many hours of work. At the current question value, I cannot dedicate that much time to this.

I will submit an under-priced report. You will receive an email letting you know the suggested price and providing you with a link to update the question value.

Thank you
Customer: replied 3 years ago.

Understood. I increased the price to your suggested offer.

Customer: replied 3 years ago.

This is more detialed information of the requirements:


Project task 1: Write queries to get





      • Movies has 4 or more actors in play.

      • Find cheapest price for movie "American Beauty" and the distributor who sells it

      • List cheapest prices for each movie including the distributors

      • List distributors and highest prices for each movie




 



    1. Project task 2: Create the following views:


      • Create a view to list all the movies available for renting.
        The view should include title, category description(not category_code), company, director, actor, store, copy, type

      • Create a view that allow you to query title, movie category, company_name, director_name, actor_name when movie_id is available.
        Note: Not all the movies have a director. You need to take this into consideration to include these records in your view.

      • create a view to allow to display all the movie in renting stores.
        It should include: movie_id, title, company_name, store_name, number_in_store, type_distributed

      • For each above views you create, write one simple query to show the results.




 


Project task 3: One transaction for movie renting activity:





      • Choose one customer from customer table. Use this customer to create a renting record for the movie, "American Beauty"
        The customer could be chosen from any rental store. You need to update relative tables for this rent transaction.
        For instance, in movie_copies, available for the movie copy should be updated to "N", indicating this copy is out for rent.
        In movie_rent_list, number_in_store should be reduced by 1. make sure that data are consistent after your transaction is done.

      • Create a view that allow you to retrieve the customer rental information:
        It should at least include: customer_id, customer name, title, store, rent_date, returned_date.

      • create a view to allow to display all the movie in renting stores.
        It should at least include: movie_id, title, company_name, store_name, number_in_store, type_distributed

      • For each above views you create, write one simple query to show the results.




 


Project task 4: Extract data for movie sale:





    • We want to know each distributor what items they sold at what price and how many copies and to whom (renting stores).

    • For this task, you need to create a view to contain all the information asked.

    • In a query to the view, you should be able to display:
      Distributor name, movie title, unit price, number of copy sold, total payment for the item, store name(customer) .

    • Write such a query to display the sale information by Amazon.come
      Requested information: movies sold, number of copies, total payment received.



Hello again, Bill.

By when do you need this?

Thank you
Customer: replied 3 years ago.

No later than sunday evening

Thank you. I will contact you once this is complete.
Hi Bill,

The data dictionary that you sent me has some normal form violations. You are using unique integer primary keys on weak entities with unique compound candidate keys. This is a violation of normal form. A record should be dependent upon the whole key and nothing but the key.

Would you like me to implement the database correctly, so that it is in actual normal form? Or would you like me to implement it exactly as it is in the data dictionary? If I implement it exactly as the data dictionary, it will not be truly in third normal form. This issue actually violates second normal form. So the database would only be in first normal form.

Let me know how you would like me to proceed. Thank you.
Customer: replied 3 years ago.
Yea, I have no problem with you implementing the database correctly. As long as the final product does as its supposed to.
Thank you. I will contact you once this is done.
Hello again, Bill.

Based on the requirements, you should have been provided with a data set to install into this database. See this requirement:

Find cheapest price for movie "American Beauty" and the distributor who sells it

So, obviously the course specifies the data to be in the database. Can you please send me this information?

Thank you
Hello again, Bill.

Disregard my previous question. I found the information that I needed.

Thank you
Hello again, Bill!

Please download the files here:

http://wikisend.com/download/264974/Queries.zip

This zip file contains two text files. The queries.txt file just holds SQL queries. The log file contains the spool data that you are required to turn in.

In this course, you would have been provided with all of the data to insert into the database. Without this, you cannot run these queries yourself.

Let me know if you have any questions. I'm here to help.

Please remember to rate my answer. Thank you so much and have a wonderful day.
TheDoctor and 6 other Homework Specialists are ready to help you
THIS ANSWER IS LOCKED!

You need to spend $3 to view this post. Add Funds to your account and buy credits.

Related Homework Questions