Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Unless you are writing a stored procedure when is the last time as an application developer your actually wrote a fully formatted SQL selector? Modern languages all include some sort of ORM feature that manages this relationship for you. The column name is far more important than being able to write clean manual SQL. Commented Oct 18, 2011 at 15:48
  • 4
    @Bill I do all the time, many, many times a day, depends more on your codebase than the language you're developing. And, for diagnostics, if you want to do some good and deep relations you can string together those natural joins and completely avoid looking up field ID's. And, as St. Jerome famously said, "Ignorance of SQL is ignorance of databases". Commented Oct 18, 2011 at 15:57
  • Aside from the fact that natural joins are not universally supported, IMO, natural joins are harder to read. Are there two columns in relationship or only one? Far better to be explicit and avoid natural joins. Commented Oct 18, 2011 at 17:33
  • 1
    @Thomas, I wouldn't put natural joins in code either, but for diagnostics, I've found them pretty useful when the database is modeled so that they actually work. Commented Oct 18, 2011 at 17:40