The Singular of Data

   By chris on February 17th 2007 in /dev/rails | 256 views

I tend to use the noun “data” often in my database tables, often when a separate table stores the associated data to another object (ie: project.user and project.user_data). I also tend to think of the word “data” as being both the singular and plural of the same thing which tends to result in my typing

chris$ script/generate model user_data

when I want to create a new Rails model. However Rails then expects my database table to be called project.user_datas and thus my model fails.

The correct singular for “data” is “datum” and hence:

chris$ script/generate model user_datum

Trackback URI | Comments RSS

Leave a Reply