Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose you are using the database composed of the following tables: a. Identify the primary keys. b. Identify the foreign keys. c. Draw the relational

image text in transcribed

Suppose you are using the database composed of the following tables:

a.Identify the primary keys.

b.Identify the foreign keys.

c.Draw the relational schema to show the relationship between DIRECTOR and PLAY.

d.Create tables. Do not forget about primary and foreign keys.

e.Insert data.

f.Suppose you wanted quick lookup capability to get a listing of all plays directed by a given director. Which table would be the basis for the INDEX table, and what would be the index key? Create the index. Provide SQL code.

g.Create a view that lists all plays in alphabetical order and names of the directors. Play Director Cat On a Cold, Bare Roof Goofy Hold the Mayo, Pass the Bread Hollywoody ... ...

h.Find all directors who were born between January 1st, 1962 and December 31st, 1962. Provide SQL code and the result.

i.Delete director with number 101 from directors table. Provide SQL code and the result of select statement for both tables before deletion and after deletion.

j.Update table PLAY. Change the name of play #1006 to Starbuck in Biloxi.

k.Find all directors who directed less than two plays. Provide SQL code and the result.

Table name: DIRECTOR DIR NUM DIR LNAME OR DOB 00 Broadway 12-Jan-65 101 Hollywoody 18-Nov-53 102 Goofy 21-Jun-62 Table name: PLAY PLAY CODE PLAY NAME 1001 Cat On a Cold Bare Roof 1002 Hold the Mayo, Pass the Bread 1003 INever Promised You Coffee 1004 Sily Putty Goes To Washington 1005 See No Sound, Hear No sight 006 Starstruck in Biloxi 1007 Stranger in Perrot Ice DR NUM 102 101 102 100 101 102 101

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Successful Keyword Searching Initiating Research On Popular Topics Using Electronic Databases

Authors: Randall MacDonald, Susan MacDonald

1st Edition

0313306761, 978-0313306761

More Books

Students also viewed these Databases questions