Question: Behavior of Natural Join with Common Attribute in Different Domains
Suppose there are two relations, R and S, and both have a common attribute named 'a'. However, the attribute 'a' belongs to different domains in the two relations (for example, R.a is an integer and S.a is a string, or R.a is a string and S.a is a date).
What will happen if I perform a natural join between R and S in this case?
I came across information suggesting that comparisons between compatible types (like integers and strings) might not throw errors in SQL but could result in an empty set. In contrast, incompatible types (like strings and dates) might raise an error. Can someone clarify how this works, especially in the context of natural joins?