Blog Post #6: Inner and Outer Joins.

The idea of  different kinds of joins is very prevalent in the database world. A join is a tool that is used to merge rows from two separate tables in order to return specified rows. Such rows may be returned if common values exist in both tables, if rows meet certain join criteria, or if there are common values in common columns.

An inner join is the more traditional option when compared to an outer join. It only shows rows that meet criterion specified by the programmer. In other words, the inner join exists when tables are joined by a matching record. This connection allows database users to retrieve information from both tables.

An outer join, on the other hand, returns more than just matching rows, it returns unmatched attributes, thus allowing the user to retrieve information from different tables without an inner join. This may be helpful in the database design because if no matching records exist, things can be done to access other tables.

To mention a few more, the natural join, the cross join and the join on clause all add a nice compliment to the aforementioned joins. There are several types of joins with different parameters and which specialize in certain areas. Essentially, the programmer has their choice of retrieval options.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.