One disadvantage of using a DATE and a TIME column in place of autonumber is that you end up with a compound primary key.  Another possible problem is if you export your data and import into another program that handles dates and time differently, you could lose some resolution if you are storing thousands of a second and whatever you are importing into can't store times with a subsecond component.  Lastly, if you are entering data from multiple workstations and their times are not synchronized, and you application requires that events be recorded in sequence, you could end up with events being recorded in one sequence, but appearing to be in another when sorted by date and time.  If you include an autonumber column, you can always tell the sequence of events (as far as their recording in the database at least), regardless of the date and time stamp that accompany the entries.
                                                            Jason
Jason Kramer
University Archives and Records Management
002 Pearson Hall
(302) 831 - 3127 (voice)
(302) 831 - 6903 (fax)
On 10/17/2012 2:08 PM, William Stacy wrote:
Are there any advantages to using one DateTime column over  2 separate columns of Date and Time? 

Also, I'm wondering if DateTime or Date+Time stamps could be used instead of autonumbering with it's rules etc.?  It seems to me that it would be rare to have any duplications of DateTime or of Date+Time if time is stored to milliseconds, unless rows are being added programmatically as opposed to by key data entry. 

--
William Stacy, O.D.

Please visit my website by clicking on :

www.FolsomEye.com







Reply via email to