BA 212 : Database Management Systems Assignment 2
Total Page:16
File Type:pdf, Size:1020Kb
BA 212: Database Management Systems – Assignment 1 1. List all tapes, and if a tape is currently rented out to a member, include the member's number and name in your report for each tape, else leave those columns blank (List tape number, member number, and member name) 2. (Movies) add 1 to the number of bonus units for each member who has rented at least 10 units. Print the updated table. 3. (Movies) List the numbers and titles of all movies that have won at least one Academy Award. 4. Chap 3 – Q 8 (Movies) List the numbers and titles of all movies whose MPAA rating is PG and that were nominated for at least one Academy Award. 5. Chap 3 – Q12 (Chazy) List all details about packages. Sort the output by package name. 6. Chap 4 – Q6 (Chazy) For each PC, list the tag number and computer ID, as well as the name, version, and type of all packages installed on the PC. 7. Chap 4 – Q6 (Movies) Find the numbers and names of all directors who have directed at least one comedy. Do this in tow ways. First, use the word IN; second, use the word EXISTS. 8. Chap 4 – Q 12 (Movies) For each movie, list the title, director’s name, and the names of all the stars who appeared in the movie. 9. Chap 5 – Q 4 (Movies) Add member 11 (name: Watson, Danielle, address: 292 Harper, city: Grant, state: Mi, number of rentals: 2, bonus:0, join date: 4/01/91). Change the members on tapes 3 and 28 to 11. 10. Chap 5 – Q 8 (Movies) Add a column called DUEBACK to the TAPE table. The column will contain the date when each tape is due to be returned. Initially, all values of DUEBACK should be null. Change the value of DUEBACK for tape 5 to 4/15/91. 11. List the total nominations received by each director through his/her movies. (List DIRNO, Name and total_noms). 12. Create a view to show all PCs and employees to whom they are assigned. Print the view. Note: Wherever a table is changed due to update, delete, or insert, print the after table and turn it in. For all queries turn in the query and the output also.