Lecture 2 SQL - Duke University

CompSci 516

Data Intensive Computing Systems

Lecture 2

SQL

Instructor: Sudeepa Roy

Duke CS, Fall 2016

CompSci 516: Data Intensive Computing Systems

1

Announcement

? If you are enrolled to the class, but have not received the email from Piazza, please send me an email

? Note: Monday 9/5 is a holiday ? no office hour

? Jung will hold an additional office hour on 9/6, Tuesday, 1 pm, North N303B

? Guest lecture by Jung on 9/7 (Wed) on Map Reduce and Spark

? Will be useful to start HW2 ? Work on HW1 and HW2 at your own pace, but note the

deadlines!

Duke CS, Fall 2016

CompSci 516: Data Intensive Computing Systems

2

Today's topic

? SQL in a nutshell ? Reading material

? [RG] Chapters 3 and 5 ? Additional reading for practice

[GUW] Chapter 6

? Try SQL from today's lecture on a toy dataset or DBLP dataset on PostGres!

Duke CS, Fall 2016

Acknowledgement:

The following slides have been created adapting the

instructor material of the [RG] book provided by the authors

Dr. Ramakrishnan and Dr. Gehrke.

CompSci 516: Data Intensive Computing Systems

3

Relational Query Languages

? A major strength of the relational model: supports simple, powerful querying of data.

? Queries can be written intuitively, and the DBMS is responsible for an efficient evaluation

? The key: precise semantics for relational queries. ? Allows the optimizer to extensively re-order operations,

and still ensure that the answer does not change.

Duke CS, Fall 2016

CompSci 516: Data Intensive Computing Systems

4

The SQL Query Language

? Developed by IBM (systemR) in the 1970s ? Need for a standard since it is used by many

vendors ? Standards:

? SQL-86 ? SQL-89 (minor revision) ? SQL-92 (major revision) ? SQL-99 (major extensions, current standard)

Duke CS, Fall 2016

CompSci 516: Data Intensive Computing Systems

5

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download