So I am currently working on a startup idea with a friend and we've come a long way, it's somewhat functional and I've tried to not let database design decisions slow the progress of the site. As of late I've had this feeling in my stomach I cannot sink.
The app I am building uses MySQL, I was considering PostgreSQ, but decided to stick to the aged old adage of: stick with what you know if you want to get something done quickly. The app is a social media-esque type application on the same scale as Linkedin in terms of the data that will be stored and correlated.
Many people I've spoken with have told me I should be using a graph database like Neo4j. I'm not afraid of learning new technologies, but I am afraid of getting caught up on the type of database I use in the tech stack if nobody is even using the app yet (I believe this is called premature optimisation). The current structure for friends is a simple users table and a pivot table that takes a src_id and a destination_id, this links the relationships together and it works.
I effectively want to create a circle graph network in MySQL. I want to be able to get the friends of a user, and then again the friends of that friend (3 levels deep is the maximum I would want to go). Each user has a weight score that is calculated by adding up a few meta key values from each friend of a user and that would also be info that would be pulled out in the query.
Now I know this will involve some kind of recursion, but before I go down a rabbit hole, I would like to know if MySQL can handle this kind of structure with a 3 level deep traversal of users (theoretically this could be thousands of rows, depending on the number of friends someone has)? If not, I will have no choice but to change.