next up previous contents
Next: Conditions Up: Select Queries Previous: Expressions

Select Expressions and Select Statements

 

Given an instantiation of variables, we also assign a values to select statements and select expressions for that instantiation.

The value associated with a select expression e is given by:

  1. If e is an expression then its value as a select expression is the same as its value as an ordinary expression;
  2. If e has the form () where is an expression which evaluates to an object identity, o of class C in the variable instantiation, are single-valued attributes of C and are set valued attributes of C, then the value of e is a tuple

  3. If e has the form (*), where is an expression that evaluates to an object identity o of class C, and are all the single valued attributes of C and are all the set-valued attributes of C, then the value of e is

Given a select statement, SELECT =, , = then the value of the select statement for a particular variable instantiation is the tuple

where is the value of the select expression for .

A special case is where a SELECT statement has only one select declaration with the attribute omitted. That is the SELECT statement has the form

     SELECT <select expression>
In this case the value of the select statement is the value of the expression, as opposed to a tuple with one system-generated attribute pointing to the value of the expression.