Cause of indeterminacy in sql, PL-SQL Programming

Assignment Help:

Cause of Indeterminacy in SQL

One root cause of indeterminacy in SQL lies in its implementation of comparison for equality. For certain system-defined types it is possible for distinct values to compare equal (note the contradiction). One such type is CHARACTER. Like COBOL, SQL ignores trailing "pad characters" when comparing character strings. The pad character is normally the space obtained by depressing the space bar on a keyboard. Thus, for example, the comparison 'SQL' = 'SQL ' evaluates to TRUE, even though CHAR_LENGTH('SQL') = CHAR_LENGTH('SQL '), comparing the lengths of those two strings, 3 and 6, evaluates to FALSE. Now consider the relational projection of ENROLMENT over just its Name attribute: ENROLMENT{Name} has a counterpart of projection, but suppose the two rows for student S1 in the ENROLMENT table had 'Anne' and 'Anne ' for S1's name.

If both of those values were to appear in the result, that would be inconsistent with the fact that they compare equal in SQL. If just one of them appears, then which one? The SQL standard declares such an expression to be possibly non-deterministic and permits a conforming implementation to give any value that compares equal to 'Anne'-possibly one that doesn't even appear in the table-and does not require it to give the same value every time the expression is evaluated. As a consequence, there are several SQL operators whose use on character strings is not permitted to appear in constraint declarations. The SQL standard lists a multitude of conditions that cause an expression to be defined as possibly non-deterministic. Perhaps the most alarming is the assumption that equals comparison of values of user-defined types is assumed to suffer from the same problem as I have described for character strings: it is assumed that distinct values can compare equal, even if the type definition is such that this cannot possibly be the case.


Related Discussions:- Cause of indeterminacy in sql

Heap sort algorithm in pl sql, I want to implement heap sort algorithm in p...

I want to implement heap sort algorithm in pl sql please share the source code for guidance

Miller-urey''s experimental procedure, MILLER-UREY' S EXPERIMENTAL PROCEDU...

MILLER-UREY' S EXPERIMENTAL PROCEDURES - They recreated the probable conditions on the primitive earth in the laboratory. An atmosphere containing hydrogen, ammonia, me

Implicit rollbacks, Implicit Rollbacks Before execute the INSERT, UPDA...

Implicit Rollbacks Before execute the INSERT, UPDATE, or DELETE statement, the Oracle marks an implicit savepoint . When the statement fails, the Oracle rolls back to the save

Parameter and keyword description - exit statement, Parameter and Keyword D...

Parameter and Keyword Description: EXIT: An unconditional EXIT statement (i.e., one without a WHEN clause) exits the present loop instantly. The Execution resumes with th

Definition of from - sql, Definition of FROM - SQL Recall that the ope...

Definition of FROM - SQL Recall that the operand of FROM is denoted by a commalist, each element of that commalist being a table expression optionally accompanied by a range v

Accessing attributes in pl sql, Accessing Attributes: You can refer to ...

Accessing Attributes: You can refer to an attribute only by its name not by its position in the object type. To access or modify the value of an attribute, you can use the dot

Use native dynamic sql - improve performance of application, Use Native Dyn...

Use Native Dynamic SQL A few programs (a normal-purpose report writer for illustration) should build and process a variety of SQL statements at run time. Therefore, their full

Comparison operators - sql operators, Comparison Operators Usually, yo...

Comparison Operators Usually, you use the comparison operators in the WHERE clause of a data manipulation statement to form the predicates, that compare one expression to anot

I need simple hosted sql database, Project Description: I want a small r...

Project Description: I want a small relational database to be built. I want the database to have the subsequent information tables: Employee Information Document storage

Enrolment was split - sql, Enrolment was split - SQL Example shows ho...

Enrolment was split - SQL Example shows how relvars IS_CALLED and IS_ENROLLED_ON can be derived from the original ENROLMENT relvar, using projection in the initial assignment

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd