我一般总是在我的表格中使用某种Hungarian Notation
作为我的字段名称,例如mysql命名约定
#Table Users
u_id, u_name, u_email etc...
#Posts
p_id, p_u_id, p_title, p_content etc...
但是我最近被告知这不是最佳实践。有没有更标准的方法来做到这一点?我并不是真的很喜欢只是使用id
这个字段,因为这是要求你选择table
。 field
使用连接时出现在多重表中的字段名称等。
您对什么是最佳实践感到满意。
table_field如何比table.field更好? – 2010-04-12 23:08:38
较少字符 – Lizard 2010-04-12 23:11:55
'u_id' verses'user'.'id' – Lizard 2010-04-12 23:12:28