Question: As the manager of the store, you are responsible for pricing the new DVD's that are delivered to the store. The pricing strategy that you

 As the manager of the store, you are responsible for pricing
the new DVD's that are delivered to the store. The pricing strategy
that you are required to use depends upon some of the values
of the characteristics of the movies on the DVD's. You must write
a PL/SQL program that will determine the Price you will charge for

As the manager of the store, you are responsible for pricing the new DVD's that are delivered to the store. The pricing strategy that you are required to use depends upon some of the values of the characteristics of the movies on the DVD's. You must write a PL/SQL program that will determine the Price you will charge for the DVD. You start with a Base Price for all DVD's that come into the store. (You might want to start the program by declaring a variable called BasePrice). All DVD's begin with the same base price of $40. Next, you must make adjustments to the base price as discussed below. DVD's of some directors need to be adjusted. David Lynch is considered a strange and obtuse director whose movies are discounted by ten percent. James Cameron and Ridley Scott movies need to have their prices increased by five percent and Steven Spielberg movies mst have their prices increased by ten percent. After making the adjustment for director, look at the rating of the movie. Movies with a " G " rating are generally priced lower than movies with other ratings. If a movie is not G rated, the price should e increased by five percent. After making the adjustments for director and rating, look at the awards an actor in the movie has won. If a movie has any actor who won an academy award for that movie, the price of the movie must be increased by $10. Write the PL/SQL code that will determine the actual price that should be charged for the movie. You need to write the code that will print the following. Be sure you declare all of the relevant variables (note you must create a variable that will be assigned the title of the movie). Information in italics should be printed from a variable and the x 's should be replaced by variables and printed in the format show. (10 Points). The movie: Name of the Movie is x years old. It has an MPAA Rating of Rating and is of mpaa type Type. The Price charged for the DVD is: $xxx.xx USE THE MOVIES ON DVD DATABASE STRUCTURE TO ANSWER THE REMAINING QUESTIONS. Write the SQL statement that will create the MOVIE table enforcing constraints for all primary and foreign keys as well as a check constraint on MPAA. Movies on DVD Database Actor \begin{tabular}{|l|l|l|l|l|l|} \hline \multicolumn{1}{|c|}{ Column } & \multicolumn{1}{c|}{DataType} & Length & DecimalPlaces & NullsAllowed? & \multicolumn{1}{|c|}{ Descriprion } \\ \hline ActNumb & Char & 4 & & No & Primary Key \\ \hline ActName & Char & 20 & & No & \\ \hline State & Char & 2 & & Yes & Statewheretheactorcur-rentlyresides. \\ \hline \end{tabular} Movie \begin{tabular}{|l|l|l|l|l|l|} \hline \multicolumn{1}{|c|}{ Column } & \multicolumn{1}{c|}{DataType} & \multicolumn{1}{c|}{ Length } & DecimalPlaces & \multicolumn{1}{|c|}{NullsAllowed?} & \multicolumn{1}{c|}{ Description } \\ \hline MvNumb & Char & 4 & & No & Primary Key \\ \hline Title & Char & 30 & & No & \\ \hline Yearmade & Char & 4 & & Yes & \\ \hline MvType & Char & 6 & & Yes & Comedy,Mystery,etc.(themoviehasoneandonlyoneclassification). \\ \hline MPAA & & & & Yes & G, PG, PG-13, or R \\ \hline Price & Decimal & 4 & 2 & Yes & The price of the DVD. \\ \hline DirNumb & Char & 4 & & No & Foreign key \\ \hline \end{tabular} MovAct \begin{tabular}{|l|l|l|l|l|l|} \hline \multicolumn{1}{|c|}{ Column } & \multicolumn{1}{|c|}{DataType} & \multicolumn{1}{|c|}{ Length } & \multicolumn{1}{c|}{DecimallsPlaces} & \multicolumn{1}{|c|}{Allowed?} & \multicolumn{1}{|c|}{ Description } \\ \hline MvNumb & Char & 4 & & No & Primary key (fik) \\ \hline Actinumb & Char & 4 & & No & Primary key (key) (fk) \\ \hline Salary & Decimal & 10 & 2 & Yes & Salarytheactorearnedforthismovie. \\ \hline Awards & Decimal & 2 & 0 & Numberofacademyawardstheactorwonforthismov-ie. \\ \hline \end{tabular}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!