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# ?

Expert's answer

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**

Learn more about our help with Assignments: C#

## Comments

## Leave a comment