Click here to Skip to main content
15,886,724 members
Home / Discussions / Database
   

Database

 
GeneralRe: JOIN vs. WHERE Pin
Mycroft Holmes12-Jul-14 14:22
professionalMycroft Holmes12-Jul-14 14:22 
GeneralRe: JOIN vs. WHERE Pin
Jörgen Andersson12-Jul-14 20:44
professionalJörgen Andersson12-Jul-14 20:44 
GeneralRe: JOIN vs. WHERE Pin
Jörgen Andersson12-Jul-14 20:55
professionalJörgen Andersson12-Jul-14 20:55 
GeneralRe: JOIN vs. WHERE Pin
Klaus-Werner Konrad13-Jul-14 0:35
Klaus-Werner Konrad13-Jul-14 0:35 
GeneralRe: JOIN vs. WHERE Pin
Jörgen Andersson13-Jul-14 1:09
professionalJörgen Andersson13-Jul-14 1:09 
GeneralRe: JOIN vs. WHERE Pin
data modeling guy13-Jul-14 5:57
data modeling guy13-Jul-14 5:57 
GeneralRe: JOIN vs. WHERE Pin
Klaus-Werner Konrad13-Jul-14 1:08
Klaus-Werner Konrad13-Jul-14 1:08 
GeneralRe: JOIN vs. WHERE Pin
Jörgen Andersson13-Jul-14 1:46
professionalJörgen Andersson13-Jul-14 1:46 
That would of course depend on which result is the correct one. I would also go very far to avoid a function in the where clause, for performance reasons.


The ISO standard I'm referring to is ISO-11179[^].
Considering the amount of text, I can't be bothered to find the actual paragraph that I'm referring to.

But the gist is that if you have a Customer Table the Surrogate Key should be named CustomerID in all tables using it no matter if it's the primary key or a foreign key.
It shouldn't be CustomerID in one table, CID in another, customer in a third, or just ID in the Customer Table. Same name everywhere to avoid confusion.

This also allows you to use the using construct[^] or even a Natural Join[^]. Personally I avoid both as I don't find that they add any clarity.

There are as always exceptions. An obvious one is when you have a Person table where the person have a work address and a home address, both columns referring to the same address table, they can't both be AddressID.
Wrong is evil and must be defeated. - Jeff Ello[^]

QuestionHow to create an audit table? Pin
Bastien Vandamme10-Jul-14 0:30
Bastien Vandamme10-Jul-14 0:30 
AnswerRe: How to create an audit table? Pin
Eddy Vluggen10-Jul-14 8:14
professionalEddy Vluggen10-Jul-14 8:14 
AnswerRe: How to create an audit table? Pin
Mycroft Holmes10-Jul-14 14:15
professionalMycroft Holmes10-Jul-14 14:15 
GeneralRe: How to create an audit table? Pin
GuyThiebaut11-Jul-14 2:09
professionalGuyThiebaut11-Jul-14 2:09 
GeneralRe: How to create an audit table? Pin
Eddy Vluggen11-Jul-14 7:28
professionalEddy Vluggen11-Jul-14 7:28 
GeneralRe: How to create an audit table? Pin
jschell11-Jul-14 9:07
jschell11-Jul-14 9:07 
GeneralRe: How to create an audit table? Pin
Eddy Vluggen11-Jul-14 9:44
professionalEddy Vluggen11-Jul-14 9:44 
GeneralRe: How to create an audit table? Pin
Mycroft Holmes11-Jul-14 14:12
professionalMycroft Holmes11-Jul-14 14:12 
GeneralRe: How to create an audit table? Pin
jschell12-Jul-14 10:33
jschell12-Jul-14 10:33 
GeneralRe: How to create an audit table? Pin
Eddy Vluggen12-Jul-14 22:57
professionalEddy Vluggen12-Jul-14 22:57 
GeneralRe: How to create an audit table? Pin
jschell14-Jul-14 9:05
jschell14-Jul-14 9:05 
GeneralRe: How to create an audit table? Pin
jschell11-Jul-14 9:11
jschell11-Jul-14 9:11 
GeneralRe: How to create an audit table? Pin
Mycroft Holmes11-Jul-14 14:19
professionalMycroft Holmes11-Jul-14 14:19 
QuestionSQL Server Express Setup Command Line Problem Pin
Amr Muhammed9-Jul-14 11:25
Amr Muhammed9-Jul-14 11:25 
AnswerRe: SQL Server Express Setup Command Line Problem Pin
Bernhard Hiller9-Jul-14 21:11
Bernhard Hiller9-Jul-14 21:11 
GeneralRe: SQL Server Express Setup Command Line Problem Pin
Amr Muhammed11-Jul-14 3:28
Amr Muhammed11-Jul-14 3:28 
QuestionError converting data type varchar to numeric Pin
Maideen Abdul Kader5-Jul-14 19:42
Maideen Abdul Kader5-Jul-14 19:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.