Question:

What is a "self-referential many-to-many relationship" in databases?

by  |  earlier

0 LIKES UnLike

Please explain the term "self-referential many-to-many relationship" in relatively simple terms. I have no experience in programming and codes, so none of that please.

 Tags:

   Report

1 ANSWERS


  1. Many-to-many relationships (wrt relational databases) defines one way how two types of objects (i.e. tables) are related. For example, if you have one object of type 'user' and another of type 'mailing list', a many-to-many easily exists since a given user can belong to many mailing lists and a given mailing list contains many users. This sort of relation is usually resolved thru a third table (in this example, user-list) that then maps out the relation.

    Where "self-referential" comes in is when the relation is of objects of the same type. An example of this might be tables of 'product' and 'construction list'. A given product (like a bolt) might have not have a construction list. Others (like a door) might have a construction list of several other products, some of which are made up of yet other products, etc.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.