CS122aSlides10

CS122aSlides10 - ICS122A / EECS116 Introduction to Data...

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

View Full Document Right Arrow Icon
1 ICS122A / EECS116 Introduction to Data Management Spring 2009 Prof. Mike Carey Bren School of ICS UC Irvine Slides based on previous CS122a lecture notes as well as  material borrowed from U-Wisconsin, Stanford, & Berkeley
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS122A/EECS116 Review Lecture 1 2 Announcements HWs and projects Midterm next Tuesday (in class) Project Part 2 due a week from today Midterm preparation Lectures and readings both fair game HWs #1-3 are available online for practice Today Review of SQL (plus a bit of E-R translation and perhaps a touch of relational algebra)
Background image of page 2
Ex: SQL at Facebook ( ) “… Here are a couple of queries:” // SQL query:  Get friends for User X SELECT user2 FROM friend WHERE user1 = X // Hive Query:  Number of users who posted a status update //                    on day X FROM f_status_update a SELECT count(DISTINCT a.user) WHERE a.ds=X ICS122A/EECS116 Lecture 1 3
Background image of page 3

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

View Full DocumentRight Arrow Icon
Simple Example Database Entities and attributes Employees Id , name, and salary Departments Number and name Relationships Each employee works in exactly one department Each employee is managed by another employee (unless he or she is the head honcho) CS122A/EECS116 Review Lecture 1 4
Background image of page 4
Corresponding E-R Schema CS122A/EECS116 Review Lecture 1 5 Employee Department eid name salary dno dname Manages WorksIn emp mgr
Background image of page 5

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

View Full DocumentRight Arrow Icon
Relational Translation CS122A/EECS116 Review Lecture 1 6 CREATE TABLE  EMP_DEMO.EMP (      EID VARCHAR(8)  PRIMARY KEY ,      MID VARCHAR(8),      NAME VARCHAR(32)  NOT NULL ,      SALARY DECIMAL(10,2),      DEPTNO INTEGER  NOT NULL
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/18/2009 for the course CS 122a taught by Professor Carey during the Spring '09 term at UC Irvine.

Page1 / 19

CS122aSlides10 - ICS122A / EECS116 Introduction to Data...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online