【问题标题】:What does the 'cd' in a database column stand for? [closed]数据库列中的“cd”代表什么? [关闭]
【发布时间】:2014-05-07 17:44:21
【问题描述】:

即foo_cd 或 bar_cd,它们是数据库中的整数,代表某种“类型”或“风味”。我知道字母 c 和 d 代表什么,但我不记得是什么。

在 rails as_enum :foo_type, {:flavorA => 1, :flavorB => 2, :flavorC => 3} 将使 DB col foo_type_cd

【问题讨论】:

    标签: sql ruby-on-rails database


    【解决方案1】:

    according to the author simply stands for code 是一个simple_enum 表后缀。

    【讨论】:

    • 天哪,你是对的。多么可怕的缩写。对不起卢卡斯韦斯特曼,爱你的宝石:)
    【解决方案2】:

    cd 没有标准含义,但从您的摘录中我希望它是代码的缩写 (bar_code, foo_code)。最佳做法是避免使用此类缩写。

    【讨论】:

    • 我认为这是某人提出的一些标准。在 rails as_enum :foo_type, {:flavorA => 1, :flavorB => 2, :flavorC => 3} 将使 DB col foo_type_cd
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-04
    • 1970-01-01
    相关资源
    最近更新 更多