I’m having problems understanding the main point of natural join in database systems. According to the definition, the natural join selects the combination of 2 tables having the same values of columns whose names equal.
My problem is: what if there are two different values of the same named columns? They will be dropped, but what if I need some information from that dropped tuples?
Can someone please explain this to me using examples?
The values don’t need to be unique, and you shouldn’t have "dropped" tupples.
A natural join is for lazy, trusting and bad programmers:
IMHO using natural joins is a terrible idea and they should never be used. You gain virtually nothing (you save typing maybe a dozen chars) and lose a lot.
EDIT:
natural joins are like any other join in terms of inner/outer: the default is inner join, but you can soecify left or right joins too, for example in mysql: