In SQL RDBMS land, people often talk about relations when they actually mean relationships. Sometimes the meaning is clear from the context, but that’s not always the case; so I thought it might be helpful to know which is which and why:
You may be surprised to learn that: relation = set = table. It’s just the mathematical term for it. The letter R in the RDBMS acronym therefore simply means that it’s a type of database that stores its data in tables. Nothing more.
A relationship, on the other hand, are about two or more tables having a field with common data (generally of integer type, if the schema is decently normalized) used for joins. In its simplest form that’s an implicit relationship, and the database doesn’t worry about it one way or another. You can make relationships explicit by defining foreign key constraints.
A join will work without a foreign key constraint, and a foreign key is still a foreign key without a constraint, it’s just that the server in that case wouldn’t care about you deleting a row from one table while a referring row in another table still exists. That’s what foreign key constraints guard against.