Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/57.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql 什么是';cd&x27;在数据库列中代表?_Sql_Ruby On Rails_Database - Fatal编程技术网

Sql 什么是';cd&x27;在数据库列中代表?

Sql 什么是';cd&x27;在数据库列中代表?,sql,ruby-on-rails,database,Sql,Ruby On Rails,Database,i、 e.foo_cd或bar_cd,它们是数据库中表示某种“类型”或“风味”的int。我知道字母c和d代表一些东西,但我不记得是什么了 在rails as_enum:foo_type中,{:flavorA=>1,:flavorB=>2,:flavolc=>3}将使DB col foo_type_cd对cd没有标准意义,但从您的摘录中,我认为它是代码的缩写 (条形码、食品代码)。最佳做法是避免使用此类缩写。这是一个简单的_enum表后缀。我认为这是有人提出的一些标准。在rails as_enum

i、 e.foo_cd或bar_cd,它们是数据库中表示某种“类型”或“风味”的int。我知道字母c和d代表一些东西,但我不记得是什么了


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

对cd没有标准意义,但从您的摘录中,我认为它是代码的缩写
(条形码、食品代码)。最佳做法是避免使用此类缩写。

这是一个
简单的_enum
表后缀。

我认为这是有人提出的一些标准。在rails as_enum:foo_type中,{:flavorA=>1,:flavorB=>2,:flavolc=>3}将使DB col foo_type_cdomg正确。多么糟糕的缩写。对不起,卢卡斯·韦斯特曼,爱你的宝石:)