SlideShare a Scribd company logo
It’s not just another article on Date-Time, But, RDBMS VIOLATIONS BY So-Called RDBMS Products!!!
Praveen Kumar Peddi

Objective:
The document intends to cover the short comings of existing data storage of date time data type and provides a
solution to them in truly relational data model and benefits of the model and most benefited areas of the systems.

Current data storage model for Date-time datatype:
At Present, Data storage of “date-time” includes both date and time as well in a single column. Almost across all
database products, storage and data retrieval of “date-time” data type is implemented as given in the below Table:
Product                                Data Type           Description
SQL Server                             Datetime           Date and Time Values from January 1, 1753, through
                                                           December, 31, 9999 accurate to 3 milliseconds
SQL Server                             Smalldatetime       Date and Time Values from January 1, 1900 through
                                                           June 6, 2079, accurate to one minute.
Oracle                                 Date                Oracle Format that includes not just the Month, day,
                                                              And year , but also the hour , minute and second.
Oracle                                 TimeStamp           TimeStamp data type Stores the date to the billionth of a
                                                             Second.
DB2                                    Date                stores a date value (month, day, and year) in Proprietary
                                                                    character data types in internal format and its
external                                                            format is MM-DD-YYYY or MM/DD/YYYY


DB2                                    Time               stores the time value (hour, minute, and second) in
                                                           Proprietary character data types in internal format and
                                                           Its external format is HH.MM.SS or HH:MM:SS


DB2                                    TimeStamp           Type combines the date and time but stores the time
                                                           Down to the nanosecond. Its External Format is MM-
                                                           DD-YYYY-HH.MM.SS.NNNNNN


Summary:
Put Together, Almost All Products includes [month, day, and year] in their respective Primary “date”
data types.




©2009 -9999 SaiPrabhu Solutions.                HELP US TO SAVE THE HUMANITY
 Strictly Private, Proprietary & Confidential
Short-Comings of Current data storage model for Date-time datatype:
          a) Date-t ime Stores the mult ip le values in single column, (month,
               day and year at least) , which means date-t ime data type is not
               atomic

          b) I t
          Primari l y vio lates the Codd’s Rule Of Guaranteed Access:
          What is Codd’s Rule of Guaranteed Access i t?
Each and Every Datum (atomic value) in a relat ional database is
guaranteed to be logical l y accessible by resort ing to a combination
of table name, primary key value, and column name.

          c) Unless t ime part is expl ic i t l y
                                              specif ied, i t wil l only return
               the results for the exact matching of “date” values.

         Date t ime does not store day of the week, as part of i t .
          d)
     EX: October, 7th 2009, does not specify , whether i t is Sunday or
Monday.

          E) Date t ime data-type does not have the capabil i t y to store and
          display the data for dates beyond 9999-Dec-31.

          F) In addit ion, we need to re-cal l the rule of thumb that date
t ime
           column cannot be used a primary key or Unique key.


[Those who want to dir t their hands on their own, can move to current
model scripts, cut/copy, paste and run!] .

[Those who are not techies, but interested to have a look and feel ,
may see the images for outcome of demonstrat ions].

Scripts:


                                               datetime_currentmo DateTime_ShortComi DateTime_ShortComi DateTime_ShortComi
                                                      del.sql         ngs_001.sql        ngs_002.sql        ngs_004.sql



                                               DateTime_ShortComi
                                                   ngs_005.sql

Images:


datetime_currenntm datetime_short_comi datetime_short_comi datetime_short_comi datetime_short_comi
      odel.jpg         ngs_001.jpg         ngs_002.jpg         ngs_004.jpg         ngs_005.jpg


                                                                                                                       Page 2
Strictly Private, Proprietary & Confidential        HELP US TO SAVE THE HUMANITY
October 6, 2009
Yes! Feedback is appreciated.




                                                                              Page 3
Strictly Private, Proprietary & Confidential   HELP US TO SAVE THE HUMANITY
October 6, 2009

More Related Content

Similar to Date Time Article

Timewizard Public
Timewizard PublicTimewizard Public
Timewizard Public
Praveen Kumar Peddi
 
Ugif 04 2011 france ug04042011-jroy_ts
Ugif 04 2011   france ug04042011-jroy_tsUgif 04 2011   france ug04042011-jroy_ts
Ugif 04 2011 france ug04042011-jroy_ts
UGIF
 
Real World Patterns for Cloud Computing
Real World Patterns for Cloud ComputingReal World Patterns for Cloud Computing
Real World Patterns for Cloud Computing
Wade Wegner
 
Multimedia Database
Multimedia Database Multimedia Database
Multimedia Database
Avnish Patel
 
New date datatypes in sql server 2008 tech republic
New date datatypes in sql server 2008   tech republicNew date datatypes in sql server 2008   tech republic
New date datatypes in sql server 2008 tech republic
Kaing Menglieng
 
IBM THINK 2018 - IBM Cloud SQL Query Introduction
IBM THINK 2018 - IBM Cloud SQL Query IntroductionIBM THINK 2018 - IBM Cloud SQL Query Introduction
IBM THINK 2018 - IBM Cloud SQL Query Introduction
Torsten Steinbach
 
LESSON 1 - DATABASE MANAGEMENT SYSTEM.pptx
LESSON 1 - DATABASE MANAGEMENT SYSTEM.pptxLESSON 1 - DATABASE MANAGEMENT SYSTEM.pptx
LESSON 1 - DATABASE MANAGEMENT SYSTEM.pptx
calf_ville86
 
Oracle sql in 7 days by suesh.n v 1.0
Oracle sql in 7 days by suesh.n v 1.0Oracle sql in 7 days by suesh.n v 1.0
Oracle sql in 7 days by suesh.n v 1.0
nsureshreddy51
 
Cloud Computing With Amazon Web Services, Part 2: Storage in the Cloud With A...
Cloud Computing With Amazon Web Services, Part 2: Storage in the Cloud With A...Cloud Computing With Amazon Web Services, Part 2: Storage in the Cloud With A...
Cloud Computing With Amazon Web Services, Part 2: Storage in the Cloud With A...
white paper
 
Normalisation in Database management System (DBMS)
Normalisation in Database management System (DBMS)Normalisation in Database management System (DBMS)
Normalisation in Database management System (DBMS)
Prof Ansari
 
SQL Server part 1 (6).pptx
SQL Server part 1 (6).pptxSQL Server part 1 (6).pptx
SQL Server part 1 (6).pptx
deepneuron
 
Creare e gestire Data Lake e Data Warehouses
Creare e gestire Data Lake e Data WarehousesCreare e gestire Data Lake e Data Warehouses
Creare e gestire Data Lake e Data Warehouses
Amazon Web Services
 
C programming session 13
C programming session 13C programming session 13
C programming session 13
AjayBahoriya
 
Dbms Lecture Notes
Dbms Lecture NotesDbms Lecture Notes
Dbms Lecture Notes
dM Technologies
 
Dbms Lecture Notes
Dbms Lecture NotesDbms Lecture Notes
Dbms Lecture Notes
dM Technologies
 
Data Wrangling: Working with Date / Time Data and Visualizing It
Data Wrangling: Working with Date / Time Data and Visualizing ItData Wrangling: Working with Date / Time Data and Visualizing It
Data Wrangling: Working with Date / Time Data and Visualizing It
kanaugust
 
Week 1
Week 1Week 1
Week 1
kcmskist
 
CD Store Management.pptx
CD Store Management.pptxCD Store Management.pptx
CD Store Management.pptx
jamilmalik19
 
notes
notesnotes
Vldb19 keynote
Vldb19 keynoteVldb19 keynote
Vldb19 keynote
M. Tamer Özsu
 

Similar to Date Time Article (20)

Timewizard Public
Timewizard PublicTimewizard Public
Timewizard Public
 
Ugif 04 2011 france ug04042011-jroy_ts
Ugif 04 2011   france ug04042011-jroy_tsUgif 04 2011   france ug04042011-jroy_ts
Ugif 04 2011 france ug04042011-jroy_ts
 
Real World Patterns for Cloud Computing
Real World Patterns for Cloud ComputingReal World Patterns for Cloud Computing
Real World Patterns for Cloud Computing
 
Multimedia Database
Multimedia Database Multimedia Database
Multimedia Database
 
New date datatypes in sql server 2008 tech republic
New date datatypes in sql server 2008   tech republicNew date datatypes in sql server 2008   tech republic
New date datatypes in sql server 2008 tech republic
 
IBM THINK 2018 - IBM Cloud SQL Query Introduction
IBM THINK 2018 - IBM Cloud SQL Query IntroductionIBM THINK 2018 - IBM Cloud SQL Query Introduction
IBM THINK 2018 - IBM Cloud SQL Query Introduction
 
LESSON 1 - DATABASE MANAGEMENT SYSTEM.pptx
LESSON 1 - DATABASE MANAGEMENT SYSTEM.pptxLESSON 1 - DATABASE MANAGEMENT SYSTEM.pptx
LESSON 1 - DATABASE MANAGEMENT SYSTEM.pptx
 
Oracle sql in 7 days by suesh.n v 1.0
Oracle sql in 7 days by suesh.n v 1.0Oracle sql in 7 days by suesh.n v 1.0
Oracle sql in 7 days by suesh.n v 1.0
 
Cloud Computing With Amazon Web Services, Part 2: Storage in the Cloud With A...
Cloud Computing With Amazon Web Services, Part 2: Storage in the Cloud With A...Cloud Computing With Amazon Web Services, Part 2: Storage in the Cloud With A...
Cloud Computing With Amazon Web Services, Part 2: Storage in the Cloud With A...
 
Normalisation in Database management System (DBMS)
Normalisation in Database management System (DBMS)Normalisation in Database management System (DBMS)
Normalisation in Database management System (DBMS)
 
SQL Server part 1 (6).pptx
SQL Server part 1 (6).pptxSQL Server part 1 (6).pptx
SQL Server part 1 (6).pptx
 
Creare e gestire Data Lake e Data Warehouses
Creare e gestire Data Lake e Data WarehousesCreare e gestire Data Lake e Data Warehouses
Creare e gestire Data Lake e Data Warehouses
 
C programming session 13
C programming session 13C programming session 13
C programming session 13
 
Dbms Lecture Notes
Dbms Lecture NotesDbms Lecture Notes
Dbms Lecture Notes
 
Dbms Lecture Notes
Dbms Lecture NotesDbms Lecture Notes
Dbms Lecture Notes
 
Data Wrangling: Working with Date / Time Data and Visualizing It
Data Wrangling: Working with Date / Time Data and Visualizing ItData Wrangling: Working with Date / Time Data and Visualizing It
Data Wrangling: Working with Date / Time Data and Visualizing It
 
Week 1
Week 1Week 1
Week 1
 
CD Store Management.pptx
CD Store Management.pptxCD Store Management.pptx
CD Store Management.pptx
 
notes
notesnotes
notes
 
Vldb19 keynote
Vldb19 keynoteVldb19 keynote
Vldb19 keynote
 

More from Praveen Kumar Peddi

Just Fqn Only
Just Fqn OnlyJust Fqn Only
Just Fqn Only
Praveen Kumar Peddi
 
Modeling Hierarchies In Database Design
Modeling  Hierarchies In Database DesignModeling  Hierarchies In Database Design
Modeling Hierarchies In Database Design
Praveen Kumar Peddi
 
Tw Bizcases
Tw BizcasesTw Bizcases
Tw Bizcases
Praveen Kumar Peddi
 
Technical Presentation - TimeWIzard
Technical Presentation - TimeWIzardTechnical Presentation - TimeWIzard
Technical Presentation - TimeWIzard
Praveen Kumar Peddi
 
Exec Summary Date Time Data Model V1.0
Exec Summary Date Time Data Model V1.0Exec Summary Date Time Data Model V1.0
Exec Summary Date Time Data Model V1.0
Praveen Kumar Peddi
 
A Philosophers View Of Java Development
A Philosophers View Of Java DevelopmentA Philosophers View Of Java Development
A Philosophers View Of Java Development
Praveen Kumar Peddi
 
Philosopher's view of data-modeling
 Philosopher's view of data-modeling Philosopher's view of data-modeling
Philosopher's view of data-modeling
Praveen Kumar Peddi
 
Article Parkinsons
Article ParkinsonsArticle Parkinsons
Article Parkinsons
Praveen Kumar Peddi
 

More from Praveen Kumar Peddi (8)

Just Fqn Only
Just Fqn OnlyJust Fqn Only
Just Fqn Only
 
Modeling Hierarchies In Database Design
Modeling  Hierarchies In Database DesignModeling  Hierarchies In Database Design
Modeling Hierarchies In Database Design
 
Tw Bizcases
Tw BizcasesTw Bizcases
Tw Bizcases
 
Technical Presentation - TimeWIzard
Technical Presentation - TimeWIzardTechnical Presentation - TimeWIzard
Technical Presentation - TimeWIzard
 
Exec Summary Date Time Data Model V1.0
Exec Summary Date Time Data Model V1.0Exec Summary Date Time Data Model V1.0
Exec Summary Date Time Data Model V1.0
 
A Philosophers View Of Java Development
A Philosophers View Of Java DevelopmentA Philosophers View Of Java Development
A Philosophers View Of Java Development
 
Philosopher's view of data-modeling
 Philosopher's view of data-modeling Philosopher's view of data-modeling
Philosopher's view of data-modeling
 
Article Parkinsons
Article ParkinsonsArticle Parkinsons
Article Parkinsons
 

Date Time Article

  • 1. It’s not just another article on Date-Time, But, RDBMS VIOLATIONS BY So-Called RDBMS Products!!! Praveen Kumar Peddi Objective: The document intends to cover the short comings of existing data storage of date time data type and provides a solution to them in truly relational data model and benefits of the model and most benefited areas of the systems. Current data storage model for Date-time datatype: At Present, Data storage of “date-time” includes both date and time as well in a single column. Almost across all database products, storage and data retrieval of “date-time” data type is implemented as given in the below Table: Product Data Type Description SQL Server Datetime Date and Time Values from January 1, 1753, through December, 31, 9999 accurate to 3 milliseconds SQL Server Smalldatetime Date and Time Values from January 1, 1900 through June 6, 2079, accurate to one minute. Oracle Date Oracle Format that includes not just the Month, day, And year , but also the hour , minute and second. Oracle TimeStamp TimeStamp data type Stores the date to the billionth of a Second. DB2 Date stores a date value (month, day, and year) in Proprietary character data types in internal format and its external format is MM-DD-YYYY or MM/DD/YYYY DB2 Time stores the time value (hour, minute, and second) in Proprietary character data types in internal format and Its external format is HH.MM.SS or HH:MM:SS DB2 TimeStamp Type combines the date and time but stores the time Down to the nanosecond. Its External Format is MM- DD-YYYY-HH.MM.SS.NNNNNN Summary: Put Together, Almost All Products includes [month, day, and year] in their respective Primary “date” data types. ©2009 -9999 SaiPrabhu Solutions. HELP US TO SAVE THE HUMANITY Strictly Private, Proprietary & Confidential
  • 2. Short-Comings of Current data storage model for Date-time datatype: a) Date-t ime Stores the mult ip le values in single column, (month, day and year at least) , which means date-t ime data type is not atomic b) I t Primari l y vio lates the Codd’s Rule Of Guaranteed Access: What is Codd’s Rule of Guaranteed Access i t? Each and Every Datum (atomic value) in a relat ional database is guaranteed to be logical l y accessible by resort ing to a combination of table name, primary key value, and column name. c) Unless t ime part is expl ic i t l y specif ied, i t wil l only return the results for the exact matching of “date” values. Date t ime does not store day of the week, as part of i t . d) EX: October, 7th 2009, does not specify , whether i t is Sunday or Monday. E) Date t ime data-type does not have the capabil i t y to store and display the data for dates beyond 9999-Dec-31. F) In addit ion, we need to re-cal l the rule of thumb that date t ime column cannot be used a primary key or Unique key. [Those who want to dir t their hands on their own, can move to current model scripts, cut/copy, paste and run!] . [Those who are not techies, but interested to have a look and feel , may see the images for outcome of demonstrat ions]. Scripts: datetime_currentmo DateTime_ShortComi DateTime_ShortComi DateTime_ShortComi del.sql ngs_001.sql ngs_002.sql ngs_004.sql DateTime_ShortComi ngs_005.sql Images: datetime_currenntm datetime_short_comi datetime_short_comi datetime_short_comi datetime_short_comi odel.jpg ngs_001.jpg ngs_002.jpg ngs_004.jpg ngs_005.jpg Page 2 Strictly Private, Proprietary & Confidential HELP US TO SAVE THE HUMANITY October 6, 2009
  • 3. Yes! Feedback is appreciated. Page 3 Strictly Private, Proprietary & Confidential HELP US TO SAVE THE HUMANITY October 6, 2009