lec08.365

Lec08.365 - Fall 2007 CPE/CSC 365 Introduction to Database Systems Alexander Dekhtyar SQL Structured Query Language SELECT Statement select

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: . . Fall 2007 CPE/CSC 365: Introduction to Database Systems Alexander Dekhtyar . . SQL: Structured Query Language SELECT Statement select Statement SQL DML consists, largely, of select statement. Basic select statement looks as follows: select [ distinct ] select-list from from-list [ where qualification ] • from-list contains the list of database relations from which the data is to be retrieved. • select-list contains the list of relation attributes (possibly modified) to be returned in the answer to the query. • qualification contains the the conditions which must be satisfied by a database record to be put into the answer set. Evaluation of select statement: 1. from-list defines a cartesian product of all relations in it. 2. qualification defines selection and join conditions on the data. 3. select-list defines the final look of the answer set (i.e., the projection at- tributes). 4. distinct specifies duplicate elimination in the final answer set (default for select query : no duplicate elimination). SQL select Statement and Relational Algebra As one can guess from its evaluation, select statement implements Relational Algebra operations selection , projection , cartesian product and join . 1 select and selection Relational algebra operation: σ C ( R ) select statement select * from R where C Note: “*” is a special notation for the selection list that includes all available attributes ....
View Full Document

This note was uploaded on 05/19/2008 for the course CSC 365 taught by Professor Dekhtyar during the Spring '08 term at Cal Poly.

Page1 / 5

Lec08.365 - Fall 2007 CPE/CSC 365 Introduction to Database Systems Alexander Dekhtyar SQL Structured Query Language SELECT Statement select

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

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