This is a very nice answer! I'd just add that in the 'Object' part of ORM, the usage is usually pretty simple. For example, something like blog_post.tags will get the tags associated with a blog post and tag.blog_posts will get the blog posts associated with a given tag.
Behind the scenes the ORM will use its mapping configuration to retrieve these associations from a relational database. That's where a join table is probably going to be used to represent a many-to-many relationship between two tables, e.g. there would be something like an X_BLOG_POST_TAG table that connects the BLOG_POST and TAG tables. However, in your domain code, you usually won't need to be aware of this, which of course is the whole point behind object-relational mapping.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is a very nice answer! I'd just add that in the 'Object' part of ORM, the usage is usually pretty simple. For example, something like
blog_post.tags
will get the tags associated with a blog post andtag.blog_posts
will get the blog posts associated with a given tag.Behind the scenes the ORM will use its mapping configuration to retrieve these associations from a relational database. That's where a join table is probably going to be used to represent a many-to-many relationship between two tables, e.g. there would be something like an
X_BLOG_POST_TAG
table that connects theBLOG_POST
andTAG
tables. However, in your domain code, you usually won't need to be aware of this, which of course is the whole point behind object-relational mapping.