I have a pet project I am working on that is a social concept. The concept at hand is the tables to support the data then query them. For this notion I am just wanting to start simple and build my way up. The theory is like any other social site. Just a comment-esk system with 1-nth number of people sharing with specific people of their choice. I understand the concept but can’t wrap my head around the logic yet maybe its because I haven’t found a note worthy article yet and/or example there of for that matter.
So that said I have come to respect the wealth of knowledge people have to offer from this site and am asking for help on getting started. What would the tables look like along with corresponding queries to start building up the concept I am looking to do.
An interesting place to start could be looking into the term “many-to-many”. While a commonly used term, it isn’t usually as simple as a one-to-many. While it is a perfectly fine way to describe a relationship, it’s not so much in SQL terms as it isn’t possible. A simple way around this is having three tables, two to hold the things in the relationship and one table to connect them.
An interesting read here possibly: http://www.tonymarston.net/php-mysql/many-to-many.html