Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6566473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:13:16+00:00 2026-05-25T14:13:16+00:00

This question comes from my readings of C.J Date’s SQL and Relational Theory: How

  • 0

This question comes from my readings of C.J Date’s SQL and Relational Theory: How to Write Accurate SQL Code and looking up about joins on the internet (which includes coming across multiple posts here on NATURAL JOINs (and about SQL Server’s lack of support for it))

So here is my problem…

On one hand, in relational theory, natural joins are the only joins that should happen (or at least are highly preferred).

On the other hand, in SQL it is advised against using NATURAL JOIN and instead use alternate means (e.g inner join with restriction).

Is the reconciliation of these that:

  • Natural joins work in true RDBMS. SQL however, fails at completely reproducing the relational model and none of the popular SQL DBMSs are true RDBMS.

and / or

  • Good/Better table design should remove/minimise the problems that natural join creates.

?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T14:13:17+00:00Added an answer on May 25, 2026 at 2:13 pm

    a number of points regarding your question (even if I’m afraid I’m not really answering anything you asked),

    “On one hand, in relational theory, natural joins are the only joins that should happen (or at least are highly preferred).”

    This seems to suggest that you interpret theory as if it proscribes against “other kinds” of joins … That is not really true. Relational theory does not say “you cannot have antijoins”, or “you should never use antijoins”, or anything like that. What it DOES say, is that in the relational algebra, a set of primitive operators can be identified, in which natural join is the only “join-like” operator. All other “join-like” operators, can always be expressed equivalently in terms of the primitive operators defined. Cartesian product, for example, is a special case of a natural join (where the set of common attributes is empty), and if you want the cartesian product of two tables that do have an attribute name in common, you can address this using RENAME. Semijoin, for example, is the natural join of the first table with some projection on the second. Antijoin, for example (SEMIMINUS or NOT MATCHING in Date’s book), is the relational difference between the first table and a SEMIJOIN of the two. etc. etc.

    “On the other hand, in SQL it is advised against using NATURAL JOIN and instead use alternate means (e.g inner join with restriction).”

    Where are such things advised ? In the SQL standard ? I don’t really think so. It is important to distinguish between the SQL language per se, which is defined by an ISO standard, and some (/any) particular implementation of that language, which is built by some particular vendor. If Microsoft advises its customers to not use NJ in SQL Server 200x, then that advice has a completely different meaning than an advice by someone to not ever use NJ in SQL altogether.

    “Natural joins work in true RDBMS. SQL however, fails at completely reproducing the relational model and none of the popular SQL DBMSs are true RDBMS.”

    While it is true that SQL per se fails to faithfully comply with relational theory, that actually has very little to do with the question of NJ.

    Whether an implementation gives good performance for invocations of NJ, is a characteristic of that implementation, not of the language, or of the “degree of trueness” of the ‘R’ in ‘RDBMS’. It is very easy to build a TRDBMS that doesn’t use SQL, and that gives ridiculous execution times for NJ. The SQL language per se has everything that is needed to support NJ. If an implementation supports NJ, then NJ will work in that implementation too. Whether it gives good performance, is a characteristic of that implementation, and poor performance of some particular implementation should not be “extrapolated” to other implementations, or be seen as a characteristic of the SQL language per se.

    “Good/Better table design should remove/minimise the problems that natural join creates.”

    Problems that natural join creates ? Controlling the columns that appear in the arguments to a join is easily done by adding explicit projections (and renames if needed) on the columns you want. Much like you also want to avoid SELECT * as much as possible, for basically the same reason …

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a language-agnostic question about an algorithm. This comes from a (probably simple)
Check this example before reading the question - http://www.sqlfiddle.com/#!2/fcf3e/8 The following data comes from
This question comes from my experience with the following question: https://stackoverflow.com/questions/492748/new-responses-icon-on-so-crashes-ie7-closed In that question,
This code comes from K&R. I have read it several times, but it still
This question has been puzzling me for a long time now. I come from
I come from Windows .Net forms development. This is a pretty basic/fundamental question. I'm
This may be a bit of daft question, but I don't come from an
This question comes on the heels of the question asked here . The email
This question comes close to what I need, but my scenario is slightly different.
Okay, this question comes through a friend so it might be lost in translation...

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.