Alex Rivera | Logout

Database name convention: DATETIME column

Asked 2009-09-04T14:15:51.300
54

What is your naming convention for DATETIME columns (in my case, using MS SQL Server)

For a column that stores when the row was created CreatedDatetime makes sense, or LastModifiedDatetime.

But for a simple table, let's say one called Event, would you create columns called:

TABLE Event
====================================================
EventID,                 // Primary key
EventDatetime,           // When the event is happening
EventEnabled             // Is the event is on

or these column names

TABLE Event
====================================================
ID,                      // Primary key
Datetime,                // When the event is happening
Enabled                  // Is the event is on

If you'd use neither convention: Please provide the column name you would use.

Edit
Report

1 Answer

4

I prefer to create columns in the second form--although I'd probably want a more descriptive name than Datetime, depending on what its use would be.

Edit: In this sort of situation, I might actually go with a hybrid for that single field, and make it 'EventDate', 'StartDate', or something similar.

answered 2009-09-04T14:17:15.040

Your Answer