- Common prexif in all table names
- es: TXXX, TYYY, TZZZ, VAAA, VBBB - T stays for Table, V stays for View
- es: APPXXX, APPYYY, APPZZZ - APP is an application name
- Common prefix in all field names in every table
es: APPXXX.XXX_FIELD_A, APPXXX.XXX_FIELD_B, APPXXX.XXX_FIELD_C - Fields with the same meaning and different names (in different tables)
es: TABLE_A.BANK_ID, TABLE_B.BK_CODE - Fields with the same logical type and different physical types
es: TABLE_A.MONEY_AMOUNT NUMBER(20,2)
TABLE_B.MONEY_AMOUNT NUMBER(20,0) -- value * 100
TABLE_B.MONEY_AMOUNT VARCHAR(20) --value * 100 as char - No foreign-keys nor integrity constraints at all - by design
- Date (or generally structured data type) representation with generic and not specific types
- es: TABLE_A.START_DATE NUMBER(8,0) -- yyyyddmm as int
- es: TABLE_B.START_DATE VARCHAR(8) -- yyyyddmm as char
- (possible only in presenceof 6.) Special values for semantic corner-cases which are syntactically invalid
es: EXPIRY_DATE = 99999999 -- represents "never expires case",
but... IT'S NOT A VALID DATE!!! - why not 99991231??
22 July 2014
Seven things I really hate in database design
Labels:
antipattern,
coding horrors,
database,
design horrors
Location:
Brescia BS, Italia
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment