1 / 8

Introduction to Database Systems CSE 444

Section 1 Introduction. Introduction to Database Systems CSE 444. Agenda. Introduction Connecting to SSMS Basic SQL Demo Project 1. Ahem… Let’s Introduce Ourselves. Your name (clear and loud please) Class standing (freshman-xth year senior) Something interesting

Mia_John
Download Presentation

Introduction to Database Systems CSE 444

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Section 1 Introduction Introduction to Database SystemsCSE 444

  2. Agenda • Introduction • Connecting to SSMS • Basic SQL Demo • Project 1

  3. Ahem… Let’s Introduce Ourselves • Your name (clear and loud please) • Class standing (freshman-xth year senior) • Something interesting • I am taking db because … • I climbed Mt. Everest this Summer … • Be creative!

  4. Connecting to SSMS • SQL Server Management Studio (Microsoft) • Log in to a lab PC, or rdesktop into aria • Run SQL Server Management Studio • Programs >> Microsoft SQL Server 2008 >> SQL Server Management Studio • Login: • Username: <your_uw_netid> • Password: <see lecture 1 slides> • Server: iisqlsrv • Authentication: Sql Server Authentication • CHANGE YOUR PASSWORD! (see link below for intructions) • http://www.cs.washington.edu/education/courses/cse444/CurrentQtr/resources/SQLServerInstructr.html • Email TAs (paramsan preferably) in case of any issues with login asap!

  5. Basic SQL • SELECT column(s) • FROM Table(s) • WHERE condition(s) • GROUP BY column(s) • HAVING special_condition(s))

  6. Query from Lecture 1 SELECT * FROM Actor, Casts, Movie WHERE Actor.id = Casts.pid AND Casts.mid = Movie.id AND lname='Hanks' AND Movie.year = 1995

  7. More Queries Select actors from popular movies: SELECT DISTINCT Actor.id, Actor.fname, Actor.lname, Actor.gender FROM Movie, Casts, Actor WHERE Movie.rank > 9.5 AND Casts.mid = Movie.id AND Actor.id = Casts.pid Count of actors with same fname and gender, sorted: Note: This was contributed by one of the students in section 2 near the end (and covered clauses not discussed so far). SELECT fname, gender, COUNT(*) AS 'count‘ FROM Actor GROUP BY gender, fname ORDER BY 'count' desc Note: 'count‘ can also be specified as [count] to avoid conflict with the function count().

  8. Project 1 • Project1 link: • Due 10/14/09, Wednesday • http://www.cs.washington.edu/education/courses/cse444/CurrentQtr/project/project1/project1.html • Make sure everyone can log in to iisqlsrv • AND DON’T FORGET TO CHANGE YOUR PASSWORD! (see link below for intructions) • Email TAs (paramsan preferably) in case of any issues with login asap! • http://www.cs.washington.edu/education/courses/cse444/CurrentQtr/resources/SQLServerInstructr.html

More Related