CSE 344 Final: CSE 344 UW 13 Spring Final Solution

24 views13 pages
31 Jan 2019
School
Course
Professor

Document Summary

Cse 414 final exam sp13 sample solution. Question 1. (28 points) sql. The following database contains information about actors, plays, and roles performed. Where: actor is a table of actors, their names, and the year they were born. Attributes actor_id and play_id are foreign keys to actor and play respectively. Assume that actor_id, play_id, year_born, and year_written are all integers, and that name, title, author, and character_name are strings. Be sure to define appropriate keys and foreign key constraints. Create table play ( play_id integer primary key, title varchar(100), author varchar(100), year_written integer. Create table role ( actor_id integer references actor(actor_id), character_name varchar(100), play_id integer references play(play_id), From role r, play p. Where p. author = august wilson" and p. play_id = r. play_id. The list should not contain duplicates but does not need to be ordered. Where p. author = chekhov" and p. play_id = r. play_id and r. actor_id = a. actor_id and a. actor_id not in (select r2. actor_id. Where p2. author = shakespeare" and p2. play_id = r2. play_id)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Documents