Archives of the TeradataForum
Message Posted: Fri, 28 Jun 2002 @ 18:33:24 GMT
One of our source systems adopted a naming standard that all unchanged field names from its source are prefixed with an X_ so that X_STATE indicates the same name as passed from its source. We did not follow a similar standard and it has become harder to remember where our data elements were mapped from. I am considering putting together views with the source system names.
I came up with the following 'rules' that I try to follow when modeling:
1. A column that means two different things should be split into two columns with different names. For example if 0-9 ,means one thing and A-Z mean something else, then these two should be separate columns. This is most frequently encountered when the source system uses a redefine in its COBOL copybook.
2. Two columns that mean the same thing should have the same name. For example, Ship_ to_State and Bill_ to_State should be State. The range of values for state should be consistent. The placement on the table should indicate the context. NOTE: This is just a guideline, I know there are lots of reasons to break this guideline.
3. A column should be self contained in its meaning. You should not have to look to another column to determine what the value means. For example, County code (000-999) has no meaning unless you know which state the county is in. A better solution is to have State_county_Cd with a range of values 000000-509999) where the first two digits are the state and the last 3 are the county. This does not break rule #1, if you want state code, then it should be a separate column in addition to state_county_cd.
4. A column should change its name when its range of values (and perhaps datatype) changes. For example, state is transformed from 01-50 to be AK-WY then its name should also change. Unless something changes, the name should remain the same everywhere.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|