File: aug28.txt Author: Jeff Kinne Contents: plan/notes for the day TODO: sample database with same schema as the running example from the book? HW1: turn in by midnight for 3/4 credit HW1, HW2 - questions, comments? Plan - keep going through the slides from the book for basic SQL, try out some SQL queries, talk some about efficiency Hw2, big O - students database, key is SID, lookup, BST, n=# students. SQL databases - Oracle, MS, mysql, postgreSQL * Using SQL inside of another programming language is something like... s = 'insert into news values (lkjsdlkfjslkdjfklj, .sdkfjlskjdfklj., )' issueSQL(s); Exercise... * get all people from nobel table that have > 1 prize * select * from nobel where something Courses taught by Jeff, ID=991123456 * select * from teaches natural join course where ID = 991123456 * SELECT course_id from teaches WHERE ID in SELECT ID from instructor WHERE name LIKE '%Kinne%' Exercise... * Econ class with most sections this semester Count # of Econ 100 sections * SELECT count(*) FROM section NATURAL JOIN course WHERE dept_name LIKE '%Econ' and course_id = 'Econ 100'