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
Equivalences & Rewrite Rules: If notice that as well as allowing us to prove trivial theorems, and tautologies enable us to establish that certain sentences are saying the sam

Example of Tables within a Table - SQL Example: Obtaining C_ER from COURSE and EXAM_MARK SELECT CourseId, CAST (TABLE (SELECT DISTINCT StudentId, Mark FROM EXAM_MARK AS EM

EXIT-WHEN The EXIT-WHEN statement permits a loop to complete conditionally. Whenever the EXIT statement is encountered, the condition in the WHEN clause is computed. When the co

Product-specific Packages The Oracle and different Oracle tools are supplied with the product-specific packages which help you to build the PL/SQL-based applications. For illu

Scoping Within the similar scope, all the declared identifiers should be unique. So, even if their datatypes differ, the variables and parameters cannot share the similar name.

Implicit Cursor is declared and used by the oracle environment internally. while the explicit cursor is declared and used by the external user. more over implicitly cursors are no

Error Handling The PL/SQL makes it easy to detect and process the predefined and user-defined error conditions known as exceptions. Whenever an error occurs, an exception is ra

Using Host Arrays The Client-side programs can use anonymous PL/SQL blocks to bulk-bind input and output host arrays. However, this is the well-organized way to pass the colle

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

UNNEST operator in SQL The inverse operator of GROUP is UNGROUP. SQL has an operator, UNNEST, that can be used for similar purposes, but its method of invocation is somewhat p