Type versus representation confusion in sql, PL-SQL Programming

Type versus Representation Confusion in SQL

This describes how a value might have two or more distinct representations. For example, user-defined type POINT might have a declared possrep based on Cartesian coordinates and another based on polar coordinates. SQL has a system-defined type, TIMESTAMP, for values representing points in time, a timestamp being represented by a date, a time of day, and-optionally-a time zone, expressed as a displacement from UTC. Clearly any timestamp can be expressed in several different ways, using different time zones.

Three o'clock in the afternoon of December 31st, 2011 in UK, for example, is the same time as two o'clock in the morning of January 1st, 2012 in New Zealand. SQL treats those two representations as distinct values that compare equal, in like fashion to its treatment of character strings with trailing blanks, with similar consequences. If instead it had treated them as distinct representations of the same value, then the issue of indeterminacy would not have arisen.

Posted Date: 1/18/2013 2:41:12 AM | Location : United States







Related Discussions:- Type versus representation confusion in sql, Assignment Help, Ask Question on Type versus representation confusion in sql, Get Answer, Expert's Help, Type versus representation confusion in sql Discussions

Write discussion on Type versus representation confusion in sql
Your posts are moderated
Related Questions
set serveroutput on declare a number(5); b number(5); c number(5); begin a:=&a; b:=&b; c:=a/b; dbms_output.put_line(c); exception when zero_divide then d

Operator Precedence The operations within an expression are completed in a particular order depending on their precedence (priority). The table shows the default order of the op

Example of EXCEPT Operator - SQL Example, like its counterpart in the theory book, illustrates the convenience of allowing any table expression to be the source for an INSERT

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

INSERT Statement The INSERT statement adds fresh rows of data to the specified database table or view. Syntax:

Name Resolution In potentially uncertain SQL statements, the names of the database columns take precedence over the names of the local variables and formal parameters. For e.g.

Use External Routines The PL/SQL is particular for the SQL transaction processing. Therefore, several tasks are more quickly completed in a lower-level language like C that is

Example of NOT EXISTS Operator - SQL Example is a translation into SQL of the corresponding example, which is included there merely to show that for any scalar comparison the

Functions The function is a subprogram which can take parameters and be invoked. Normally, you can use a function to calculate a value. The function has 2 sections: the specifi

Entering and Exiting If you enter the executable part of an autonomous routine, the major transaction suspends. When you exit the routine, the major transaction resumes. To ex