Answer to Question #197284 in C# for Antoine

Question #197284

I started a project on SQL but I think C # is better suited for solving this.

I search the "distance" in terms of common student between two given student.


Database sample :

https://stackoverflow.com/questions/67650737/calculate-all-the-paths-between-two-names?noredirect=1#comment119576436_67650737


The goal is to calculate the distance between Momo Thary (2018) and Paul Biloux (2020). The answer is 2 students : Momo Thary -> Jack Spiral. Jack Spiral -> Lucien Lake. And Lucien Lake -> Paul Biloux.

We can "link" Momo and Paul with 2 students. Distance = 2.


The issue is when I try a program to know all the possible paths (with distance < 5 so it is not too long to calculate).


SQL code:


https://stackoverflow.com/questions/67650737/calculate-all-the-paths-between-two-names?noredirect=1#comment119576436_67650737


It works but SQL is not suited for calculating in my 500k database, way too slow.


For the experts, what could be the "translation" of my SQL code in C# ?



1
Expert's answer
2021-05-27T07:25:00-0400
Dear Antoine, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS