Indeterminacy in sql, PL-SQL Programming

Indeterminacy in SQL

Some SQL expressions are actually not function invocations at all in the mathematical sense, being indeterminate-invocations operating on identical input do not always yield the same value. The indeterminate expressions are among those that the standard defines as possibly non-deterministic, but- caveat lector-not all expressions defined as possibly non-deterministic are actually indeterminate from a mathematical viewpoint. For example, the key word USER denotes the userid (officially, the authorization identifier) of the session in which an expression containing that key word is evaluated. Such an expression is defined as possibly non-deterministic by virtue of the appearance of USER, even though invocations in different sessions, in which USER stands for different userids, are clearly different invocations.

For a more general example, a user-defined function can be explicitly declared as either DETERMINISTIC or NOT DETERMINISTIC. In the latter case the "function" is flagged such that all invocations of it are treated as possibly non-deterministic. Regardless of the appropriateness of the term non-deterministic, there is a good reason for categorizing references to the current user (or, for another example, the current time) along with genuine cases of indeterminacy. It concerns constraint declarations. We clearly want to outlaw a constraint condition whose result, when evaluated, depends on the properties of the session in which, or on the time at which, the evaluation takes place. Of course we must also outlaw genuinely indeterminate conditions-a database might satisfy such a condition but later fail to satisfy it even though the database has not been updated in the meantime! The question then arises as to how it is possible for indeterminacy to arise: surely a computer program always gives the same result when invoked with the same input?

Posted Date: 1/18/2013 1:53:25 AM | Location : United States







Related Discussions:- Indeterminacy in sql, Assignment Help, Ask Question on Indeterminacy in sql, Get Answer, Expert's Help, Indeterminacy in sql Discussions

Write discussion on Indeterminacy in sql
Your posts are moderated
Related Questions
Multiple Assignment- SQL SQL supports multiple assignment to local variables and also applies multiple assignment semantics in SET clauses of UPDATE statements, but does not

Components of an Object Type: An object type encapsulates the operations and data. Therefore, you can declare the methods and attributes in an object type specification, but no

Example of DELETE - SQL As with UPDATE, a FOR PORTION OF clause can be specified if the target table has a defined period name, as illustrated in Example. Example: Deleting

Anatomy of a Table: Figure shows the terminology used in SQL to refer to parts of the structure of a table. As you can see, SQL has no official terms for its counterpa

Use Bulk Binds If SQL statements execute inside a loop using the collection elements as bind variables, context switching between the PL/SQL & SQL engines can slow down the ex

Perform the following queries on the Hospital1.DB using SQL Anywhere (START EARLY!). a. Which patients have purchased the drug "Tylenol"? List the names and addresses. Arrange the

FORALL Statement The FORALL statements instruct the PL/SQL engine to bulk-bind the input collections before sending them to the SQL engine. Though the FORALL statement consists

The Package Specification The package specifications contain the public declarations. The scopes of these declarations are local to your database representation and global to t

%ROWCOUNT When its cursor or cursor variable is opened, the %ROWCOUNT is zeroed. Before the first fetch, the %ROWCOUNT yields 0. Afterward, it yields the number of rows fetche

Organi c Evolution Evolution is a slow continuous, irreversible and natural process of change to give rise to advance and diverse forms of life i.e. formation of new specie