Just wanted to make sure that I'm understanding this right:
I can remember that my teacher, for a while ago, was talking about associations between entities which makes me unsure what words are the right way to use in the context of UML-diagrams and SQL.
Words to figure out: entity, relation and association. Contexts: UML and SQL.
In UML we have classes and associations. There is no entity in the UML specifications, although a popular class stereotype is «entity»
:
an entity represents long-lived information relevant for the stakeholders
which, in other words, generally refer to a set of presistant domain object stored in a database.
In SQL databases, we have tables. Tables represent what is called a relation in relational algebra. Now database modellers have invented the term of entity that corresponds to a set of relations, and relationships that correspond to a mapping between entities.
So you mix in your question very different concepts. However, there are some similarities: relational entities correspond to a subset of simple classes without behaviours, and relationships correspond to associations. The field that maps the relational world with classes is called object-relational mapping (ORM). ORM is a set of techniques that allow to map classes of objects to database tables and associations to relationships, and vice-versa.