Question

03:

Based on the ERD below, answer the following questions:

1. Give at least 3 examples of FK in the ERD below.

2. Write SQL query to show the Actor's First Name, Last Name, and the number of movies

they have acted in.

3. Create a view that lists the movie ID and number of actors in each movie.

oooo

OPK ACID

char(5)

AcFirstName Varchar(50)

AcLastName Varchar(50)

Actor

PK MID

Movie

MvTide

MvRelease

Date

RUD

char(5)

Type

Type

Type

oooo

MovieActor

PK MMD

PK ACID

Movie Genre

PK

MvID

PK GnID

Char(5)

Char(5)

char(5)

Char(5)

Genre

PK GnlD char(5)

GnDesc Varchar(50)

Question image 1