I need assistance with the query commands assigned to an assignment. I have the databases properly created and do not need assistance with the commands associated with creating the databases. Here is the complete assignment. I have attached the database information.
The structure of the movies database is as follows:
Director (DIRNUB, DIRNAME, DIRBORN, YR-DIRDIED)
STAR (STARNUB, STARNAME, BIRTHPLACE, STARBORN, YR-STARDIED)
MOVIE (MVNUB, MVTITLE, YRMDE, MVTYPE, CRIT, MPAA, NOMINATIONS, AWRD, DIRNUB)
MOVSTAR (MVNUB, STARNUB, AMTPAID)
MEMBER (MMBNUB, MMBNAME, MMBADD, MMBCITY, MMBST, NUMRENT, BONUS, JOINDATE)
TAPE (TAPENUM, MVNUB, PURDATE, TMSRNT,MMBNUB)
Create Video Store database as discussed in the class. Make sure to correct column widths/types before creating tables. Use SQL to form queries to produce the following reports:
- ** List the names and numbers of directors whose names begin with the alphabet ‘K’.
- List the tape no, movie title, and the membership number and name of members, who are currently borrowing tapes numbered below 20. Arrange the report in descending order by tape number.
- List the names and respective numbers of stars and directors who have worked together.
- ** List the tape numbers for movies of movie type: ‘HORROR’.
- List the name of the director who has received the maximum number of total awards considering all his/her movies: AWRD.
- ** List the names of all members who have not borrowed any movie currently.
- List the movie type and number of tapes for each type in the database.
- ** For each movie list total how many times it has been rented: TMSRNT.
- Report the total times rented (TMSRNT) for each movie type.
- The database administrator discovers that the name of director whose number is 7 in the database should be spelt as ‘JOHNNY FORD’. Make corrections to the data.
- Delete the movie number 14 and all its tapes. Print both tables to verify.
- List all tape numbers and their movie titles, and indicate the member number and member name if the tape is currently rented out.
13. List all tape numbers, and also indicate the member’s city if a tape is currently rented out by a member.
14. Who is the youngest director? How many movies did he/she direct?
15. Grant access to me (joshi) to your movstar table for select and update.
16. Create a unique index on movstar table.
17. For each movie type list the average age of movies given the current year is 2011.
18. ** Create a view MEMB_TAPES that includes the currently rented movies and the members who are renting them, include movie type.
19. ** Use the view MEMB_TAPES to find all currently rented “COMEDY” type movies and members who are renting them.
20. ** List all tape numbers, along with movie name and member name if rented out (leave member name blank if not rented out).