我在哪里可以找到/学习行业标准SQL约定?

时间:2022-07-02 15:07:58

I work at a company that has some very non-standardized SQL conventions (They were written by Delphi Developers years ago). Where is the best place that I can find SQL industry standard convention definitions that are most commonly used?

我在一家公司工作,该公司有一些非标准化的SQL约定(几年前由Delphi Developers编写)。在哪里可以找到最常用的SQL行业标准惯例定义?

5 个解决方案

#1


6  

In his book "SQL Programming Style," Joe Celko suggests a number of conventions, for example that a collection (e.g. a table) should be named in the plural, while a scalar data element (e.g. a column) should be named in the singular.

在他的“SQL编程风格”一书中,Joe Celko提出了许多约定,例如,一个集合(例如一个表)应该以复数形式命名,而标量数据元素(例如一个列)应该以单数形式命名。 。

He cites ISO-11179-4 as a standard for metadata naming, which supports this guideline.

他引用ISO-11179-4作为元数据命名的标准,支持该指南。

#2


6  

  1. there aren't any
  2. 没有

  3. it there were, they'd be obsolete
  4. 它有,它们已经过时了

  5. if they're not obsolete, you won't like them
  6. 如果它们没有过时,你就不会喜欢它们

  7. if you like them, they're insufficient
  8. 如果你喜欢他们,他们就不够了

  9. if they're sufficient, no one else will like them
  10. 如果它们足够,没有人会喜欢它们

seriously, strive for readability, i.e. use meaningful field and table names; nothing else is really necessary

严肃地说,争取可读性,即使用有意义的字段和表名;没有别的东西真的有必要

(ok some common prefixes like usp and udf and udt may be useful, but not required)

(好的,像usp,udf和udt这样的常用前缀可能很有用,但不是必需的)

#3


3  

This is the best one I've ever seen... Naming Conventions

这是我见过的最好的...命名约定

However, standards should really be all about clarity, simplicity, and ease of adoption among your team.

但是,标准应该完全取决于团队的清晰度,简单性和易用性。

There shouldn't be a bunch of incredibly strict naming guidelines, it should focus on style. The point is not to torment developers, it is to create a congruent style throughout the system so that it is easy to move from one section to another.

不应该有一堆非常严格的命名准则,它应该专注于风格。关键不在于折磨开发人员,而是在整个系统中创建一致的风格,以便从一个部分移动到另一个部分。

#4


2  

There are no exact industry-wide SQL standards. The best option is to google for SQL standards because several knowlegable people have posted some rather good, extensive, and complete documents on the subject. Read through them and absorb the items that apply to your environment.

没有确切的行业SQL标准。最好的选择是google for SQL标准,因为几个知识渊博的人已经发布了一些关于这个主题的相当好,广泛和完整的文档。仔细阅读它们并吸收适用于您的环境的项目。

#5


1  

Here you can find a lot of Rules to better SQL /SQL Server.
Yes, it's the company that I am working for, but they are good! And these rules come from experience with client projects.

在这里你可以找到很多更好的SQL / SQL Server规则。是的,这是我工作的公司,但他们很好!这些规则来自客户项目的经验。

Have a look and take what you like!

看看你喜欢什么!

#1


6  

In his book "SQL Programming Style," Joe Celko suggests a number of conventions, for example that a collection (e.g. a table) should be named in the plural, while a scalar data element (e.g. a column) should be named in the singular.

在他的“SQL编程风格”一书中,Joe Celko提出了许多约定,例如,一个集合(例如一个表)应该以复数形式命名,而标量数据元素(例如一个列)应该以单数形式命名。 。

He cites ISO-11179-4 as a standard for metadata naming, which supports this guideline.

他引用ISO-11179-4作为元数据命名的标准,支持该指南。

#2


6  

  1. there aren't any
  2. 没有

  3. it there were, they'd be obsolete
  4. 它有,它们已经过时了

  5. if they're not obsolete, you won't like them
  6. 如果它们没有过时,你就不会喜欢它们

  7. if you like them, they're insufficient
  8. 如果你喜欢他们,他们就不够了

  9. if they're sufficient, no one else will like them
  10. 如果它们足够,没有人会喜欢它们

seriously, strive for readability, i.e. use meaningful field and table names; nothing else is really necessary

严肃地说,争取可读性,即使用有意义的字段和表名;没有别的东西真的有必要

(ok some common prefixes like usp and udf and udt may be useful, but not required)

(好的,像usp,udf和udt这样的常用前缀可能很有用,但不是必需的)

#3


3  

This is the best one I've ever seen... Naming Conventions

这是我见过的最好的...命名约定

However, standards should really be all about clarity, simplicity, and ease of adoption among your team.

但是,标准应该完全取决于团队的清晰度,简单性和易用性。

There shouldn't be a bunch of incredibly strict naming guidelines, it should focus on style. The point is not to torment developers, it is to create a congruent style throughout the system so that it is easy to move from one section to another.

不应该有一堆非常严格的命名准则,它应该专注于风格。关键不在于折磨开发人员,而是在整个系统中创建一致的风格,以便从一个部分移动到另一个部分。

#4


2  

There are no exact industry-wide SQL standards. The best option is to google for SQL standards because several knowlegable people have posted some rather good, extensive, and complete documents on the subject. Read through them and absorb the items that apply to your environment.

没有确切的行业SQL标准。最好的选择是google for SQL标准,因为几个知识渊博的人已经发布了一些关于这个主题的相当好,广泛和完整的文档。仔细阅读它们并吸收适用于您的环境的项目。

#5


1  

Here you can find a lot of Rules to better SQL /SQL Server.
Yes, it's the company that I am working for, but they are good! And these rules come from experience with client projects.

在这里你可以找到很多更好的SQL / SQL Server规则。是的,这是我工作的公司,但他们很好!这些规则来自客户项目的经验。

Have a look and take what you like!

看看你喜欢什么!