What is so bad about using SQL INNER JOIN

Posted by Stephen B. Burris Jr. on Stack Overflow See other posts from Stack Overflow or by Stephen B. Burris Jr.
Published on 2010-03-16T00:35:30Z Indexed on 2010/03/16 0:39 UTC
Read the original article Hit count: 472

Filed under:
|
|

Everytime a database diagram gets looked out, one area people are critical of is inner joins. They look at them hard and has questions to see if an inner join really needs to be there.

Simple Library Example:

A many-to-many relationship is normally defined in SQL with three tables: Book, Category, BookCategory.

In this situation, Category is a table that contains two columns: ID, CategoryName.

In this situation, I have gotten questions about the Category table, is it need? Can it be used as a lookup table, and in the BookCategory table store the CategoryName instead of the CategoryID to stop from having to do an additional INNER JOIN. (For this question, we are going to ignore the changing, deleting of any CategoryNames)

The question is, what is so bad about inner joins? At what point is doing them a negative thing (general guidelines like # of transactions, # of records, # of joins in a statement, etc)?

© Stack Overflow or respective owner

Related posts about Performance

Related posts about sql