SQL is the first programming language with temporal data types. The SQL-92 standard added temporal data to the language, acknowledging most of what was already in most SQL products by that time. The problem is that each vendor made a trade-off internally.
To be able to use temporal data properly to improve the quality of SQL code, it is important to understand the ISO temporal model, the SQL temporal data types, date and time format standards, and time zone interval data types. It is also important to understand queries with date arithmetic, the use Of Null for ‘eternity’, the overlaps() predicate, calendar and report period tables, and state transition constraints.
Read the 27-page whitepaper "Making Time Using Temporal Data" by Joe Celko to learn how to use temporal data to improve your SQL code.
Click here to read the whitepaper.
The author, Joe Celko, serves as Member of Technical Advisory Board of Cogito, Inc. Mr. Celko joined the ANSI X3H2 Database Standards Committee in 1987 and helped write the ANSI/ISO SQL-89 and SQL-92 standards. He is one of the top SQL experts in the world, writing over 700 articles primarily on SQL and database topics in the computer trade and academic press. The author of six books on databases and SQL, Mr. Celko also contributes his time as a speaker and instructor at universities, trade conferences, and local user groups.