Skip to document

Worksheet Chapter 8 memo

Worksheets for practise with memos
Course

Introduction to Databases and Databases Management Systems:Part 1 (CSIQ2634)

37 Documents
Students shared 37 documents in this course
Academic year: 2021/2022
Uploaded by:
Anonymous Student
This document has been uploaded by a student, just like you, who decided to remain anonymous.
University of the Free State

Comments

Please sign in or register to post comments.

Preview text

UNIVERSITY OF THE FREE STATE

Department of Computer Science

and Informatics

CSIQ 2634

Worksheet (Chapter 8)

Question 1

Create the ERD into a database called Movies4All within SQL Server. Write the correct create table statements with the correct constraints, suitable data types and primary and foreign keys.

MovieI d MovieTitle

MovieYearMad e

MovieYearRelease d

GenreI d

StudioI d

1

Death Before Dishonor 2013 2014 6 1 2 Deaths Mistress 2014 2015 1 2 3 Rings of Fire 2015 2016 2 4 4 Sad Sadness 2014 2015 5 3 5 Lovey Love 2013 2014 3 2 6 Death Door 2012 2016 1 3

MovieId ActorId 1 1 1 2 1 3 2 5 2 6 2 8 3 4 3 5 3 6 4 1 4 2 4 8 5 3 5 5 5 8

AwardId MovieId 1 4 2 5 3 1

MovieId CrewId 1 1 1 6 1 7 1 9 1 10 2 1 2 5 2 6 3 3 3 5 3 9

4 1

4 2

4 3

5 5

5 6

5 7

Occupation Id

OccupationNa me 1 Sweeper 2 Camera man 3 Fluffer

4

Lighting Specialist 5 IT Technician 6 Special Effects 7 Engineer

StudioI d StudioName

StudioTelephon e

1

African Awesome 0215558888 2 Cape Studios 0115553333 3 Prima Studio 0315555555

4

Alpha Beta Omega 0215554444

Question 3

  1. Write done the SQL query to determine the release dates for the movies that contain “Death” in the title.

select Movie, Movie from Movie where Movie like 'Death%'

  1. Modify the query from Question 1 to determine whether any of these movies have won an award.

select Movie, Movie, Award from Movie join MovieAward on Movie = MovieAward join Award on MovieAward = Award where Movie like 'Death%'

  1. Use a SQL query to determine which awards have been won by which studio.

select Movie, Studio, Award

Was this document helpful?

Worksheet Chapter 8 memo

Course: Introduction to Databases and Databases Management Systems:Part 1 (CSIQ2634)

37 Documents
Students shared 37 documents in this course
Was this document helpful?
UNIVERSITY OF THE FREE STATE
Department of Computer Science
and Informatics
CSIQ2634
Worksheet (Chapter 8)
Question 1
Create the ERD into a database called Movies4All within SQL Server. Write the correct create table
statements with the correct constraints, suitable data types and primary and foreign keys.
1 | P a g e