User Tools

Site Tools


labs:namethatmovie

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
labs:namethatmovie [2016/04/22 11:54]
lpeer [Exercise 5 - Plot some things]
labs:namethatmovie [2020/08/31 21:03] (current)
Line 11: Line 11:
  
   - Extract all relevant entries from the academy award nominees table on the linked website.   - Extract all relevant entries from the academy award nominees table on the linked website.
-  - Design a database schema and create a sqlite database with the collected data. Make sure you give your database the columns: ** year **, ** event **,  **movie**, **actor**, **role** and **won**.+  - Design a database schema and create a sqlite database with the collected data. Make sure you give your database the columns: ** year **, ** event **,  **movie**, **actor**, **role** and **won**. Be careful to [[https://​docs.python.org/​2/​library/​sqlite3.html|escape]] all strings when adding rows to the database.
  
  
Line 25: Line 25:
 ===== Exercise 3 - Crawl Rottentomatoes ===== ===== Exercise 3 - Crawl Rottentomatoes =====
  
-To keep web traffic low and reduce the risk of being blacklisted,​ we have cloned some rottentomatoes pages and are hosting them locally. You can access the detail page through a unique url. Combine the year and movie title like this: http://​10.0.0.2/​m/​year/​title to access the local clone of the movie detail page. (Transform the movie title to lower case. Remove any apostrophe characters (') and replace spaces and backslashes (/) with underline characters (_)).+To keep web traffic low and reduce the risk of being blacklisted,​ we have cloned some rottentomatoes pages and are hosting them locally. You can access the detail page through a unique url. Combine the year and movie title like this: http://​10.0.0.1/​m/​year/​title to access the local clone of the movie detail page. (Transform the movie title to lower case. Remove any apostrophe characters (') and replace spaces and backslashes (/) with underline characters (_)).
  
     - Visit any of the local movie sites. Which element contains the [[https://​en.wikipedia.org/​wiki/​Rotten_Tomatoes#​Tomatometer_critic_aggregate_score|tomatometer]] score of the movie? Which element contains the audience score?     - Visit any of the local movie sites. Which element contains the [[https://​en.wikipedia.org/​wiki/​Rotten_Tomatoes#​Tomatometer_critic_aggregate_score|tomatometer]] score of the movie? Which element contains the audience score?
Line 33: Line 33:
 ===== Exercise 4 - Query the IMDB Database ===== ===== Exercise 4 - Query the IMDB Database =====
  
-We've collected some of information about movies from various sources and have compiled a database with a number of tables. You can find the sqlite [[http://pc-10129.ethz.ch/sqlquery/images/​moviedb.sqlite|here]]. Familiarize yourself with the [[http://​pc-10129.ethz.ch/​sqlquery/​schema|schema]] and contents and answer the following questions. If you need help and cannot google a solution, feel free to ask the assistants.+We've collected some of information about movies from various sources and have compiled a database with a number of tables. You can find the sqlite [[http://10.0.0.1/download/​moviedb.sqlite|here]]. Familiarize yourself with the [[http://​pc-10129.ethz.ch/​sqlquery/​schema|schema]] and contents and answer the following questions. If you need help and cannot google a solution, feel free to ask the assistants.
   - The creator of the database was sloppy and accidentally entered some movies twice. How can you find out which? Remove them from the database! Make sure to also remove the dependent foreign key constraints from other tables.   - The creator of the database was sloppy and accidentally entered some movies twice. How can you find out which? Remove them from the database! Make sure to also remove the dependent foreign key constraints from other tables.
   - How many of the movies you crawled in the first exercise are already in the IMDB db? Which are missing?   - How many of the movies you crawled in the first exercise are already in the IMDB db? Which are missing?
labs/namethatmovie.1461318864.txt.gz ยท Last modified: 2020/08/31 21:03 (external edit)