HiveBrain v1.2.0
Get Started
← Back to all entries
patternCritical

How should I best name my timestamp fields?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
timestamphowfieldsnameshouldbest

Problem

When I am looking to create some timestamp fields (or other date/time style fields), what is the best way to name them? Should I just put record_timestamp?

Solution

You should describe the purpose of the column and not necessarily the data type. You can include date/time/timestamp in the name, but you should also include the meaning. For example

  • CreationDate



  • StartDate



  • StatusTime



  • Accessed



  • Updated



Adding Date/Time/Timestamp and such at the end is particularly useful when the abscence of the addition would conflict with another column. For example, a table may need both a Status and a StatusTime.

Context

StackExchange Database Administrators Q#2677, answer score: 58

Revisions (0)

No revisions yet.