Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find/learn industry standard SQL Conventions?

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?

like image 838
GluedHands Avatar asked Dec 18 '08 20:12

GluedHands


2 Answers

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.

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

like image 153
Bill Karwin Avatar answered Sep 19 '22 15:09

Bill Karwin


  1. there aren't any
  2. it there were, they'd be obsolete
  3. if they're not obsolete, you won't like them
  4. if you like them, they're insufficient
  5. if they're sufficient, no one else will like them

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)

like image 43
Steven A. Lowe Avatar answered Sep 21 '22 15:09

Steven A. Lowe