Column Base Names
| Base Name | Data Type | Description |
| amt | FLOAT |
Amount An amount, regardless of whether it is an integer or floating point quantity. An example would be Transaction.amt. amt, in this case, refers to the quantity of money associated with the transaction. |
| cd | NVARCHAR(2) |
Code A very short code that provides direct identifies subtypes of records in the table. Example: Transaction.cd directly identifies the type of transaction (eg. IN for invoice, CR for credit note) It’s important that the codes chosen reflect the nature of what they encode. A, for invoice, would be a bad choice. Once established, a constraint should be placed on the column to ensure only valid codes are used. |
| dsc | NVARCHAR(1024) |
Description Text that provides a verbose description. In my work to date, I consistently used the somewhat quirky 1024 (that is 2^10) as the length for this column. However, in the future, it’s likely that I will simply use NVARCHAR(MAX), as you get all of the benefits of NTEXT, without its attendant drawbacks |
| dt | DATETIME |
Date/Time Local date/time. As localization capabilities become more commonplace, and applications become more global in scope, the need to store any date and time in local time will diminish - you will simply convert to local at presentation to the user. This Base Name should see less and less over time. |
| flg | BIT |
True/False (as in flag set, not set) The world probably doesn’t need another word to describe a binary state, but I have always felt that BIT and BOOL are obtuse, particularly for the generation that has never seen assembly language. flg is likely not that much better, but I think most can relate to the notion of a flag being either up or down, so flg it is. Boy, am I going to get letters about this one. |
| id | INT |
Identifier Pretty much reserved for the primary key of the table, and if it is present, it will be the first column of the table, even if that breaks the rule of keeping column names in alphabetical sequence. |
| img | IMAGE |
Image (binary) Binary data, regardless of source or what it represents. An example would be Document.img. img would contain binary data related to the document. The type of binary data contained in the img column would have to be captured in some other column in the Document table. |
| lbl | NVARCHAR(10) |
Label A very short identifier for the records in a column. It’s likely to be unique, and given that it is, this should be enforced with an index. in In terms of data type, I suggest NVARCHAR(10), but realistically, it could very well be less than that - the minimum number of characters dictated by the data found in this column. Example: an invoice number such as AB2345. |
| nm | NVARCHAR(50) |
Name There’s a pretty good chance that the name found in this column will be unique for the entire table, and I usually enforce that constraint using a unique index. |
| seq | INT |
Sequence Used to impose a specific sequence on a group of records within the table. |
| udt | DATETIME |
UTC Date/Time In the future this will become the standard method of storing date and time. |
| xml | XML |
XML Well-formed XML data, regardless of source or what it represents. |
No comments yet.