{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


ICA-5-SQL-Part-1.docx - In-class Activity#5 Working with...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
In-class Activity #5: Working with SQL, Part 1 Getting Information out of a Database Submit your solutions for Part 2 of this exercise as a word or pdf file through Blackboard by Wednesday, 9/27/2017, 11:59 pm. To do this exercise, you will be working with a movie rental database. The schema for this database is provided on the accompanying document. All of the tables are in a schema called simply “ moviedb ” (not m0moviedb, m1moviedb, etc.). You can’t write to any of the tables – you can only use SELECT statements to read from them (so don’t worry about causing any damage). Spend some time looking at the schema carefully. The field names are pretty self-explanatory. For example, here are three tables: You can see that a film has a title, description, rating, and length (among other things). You can also see that an actor has a first name and a last name. The film_actor table implements the many-to-many relationship between actor and film (i.e., a film can have more than one actor, and an actor can be in more than one film). You’ll also notice that data types are listed for each field, but they should be pretty obvious – for example, first_name is a VARCHAR because it is a string value.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Part 1: Try out some simple queries In the Query 1 pane, type the following: And then click the Execute SQL Script button (the lightning bolt):
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}