Is there any convenience in name date-time related columns? created and delivered, … or createdTS, deliveredTS or createdAt, deliveredAt or…
Asked
Active
Viewed 1,054 times
1
Real Dreams
- 261
- 1
- 4
- 12
1 Answers
2
Chose a name that is unambiguous. created could mean the following things:
- "was created yes/no" (a boolean value)
- the "object" that was created, maybe the name of it as a string
- the datetime when it was created
Probably more. deliveredAt has similar problems. It could be the location where a parcel was delivered at. I really hate these ambiguous naming schemes.
If you just name it createDateTime all ambiguity is gone. The point here is not to add the type to the name. The point is to not leave the name open to interpretation what it means.
usr
- 7,330
- 5
- 32
- 58
created_onis nice and short. Plus a good tool shows you the name of the column and its datatype so there should be no need to encode the datatype in the name. – Colin 't Hart May 10 '14 at 11:56