80 likes | 202 Views
CSE 103 — Intro to Information Technology. Pilot course: CSE 291/001 Lead TA: Vaughn Assistant TA: Dave. Questions from Day 26 Readings. What are tables in a database? What is the primary key of a table? What are queries? What are filters? How does a query differ from a filter?.
E N D
CSE 103 — Intro to Information Technology • Pilot course: CSE 291/001 • Lead TA: Vaughn • Assistant TA: Dave
Questions from Day 26 Readings • What are tables in a database? • What is the primary key of a table? • What are queries? • What are filters? • How does a query differ from a filter?
Outline of Today • Focus on the Movie entity • Create a database in Access 2000 • Construct filters and queries to retrieve information
Creating the Database • Large database around 38MB in size • delete unneeded files • Start Access 2000 • Create a Blank Access Database • call the database movieinfo.mdb
Importing Data • Get external data from moviedata.txt in the Day26 course AFS space • tab-delimited text • Create a new table • Make the primary key MovieID • Call the table tbl_movies
Field Names • MovieID; datatype Long Integer • Title • Year; datatype Long Integer • Rating • Length; datatype Long Integer • Director • Language • Genre • All other datatypes should be text
Creating Queries • Using Design View create queries to answer the questions on the following slide • Save each query with a descriptive name • use the naming convention where the name of each query starts with qry_
Which movies might my parents have seen before I was born? Which movies were released in the year I was born? Which movies are in any language I speak? Which movies could I go to alone when I was 16? (G or PG or PG-13) What about movies released before 1940 and rated (G or PG or PG-13) (should return nothing) Which movies do we not know the running times for? Query Exercise Questions