The main problem is not understanding how to connect the database (spring data jpa) + d3.js (implementation of the main program for spring mvc)
There are tables
DB (profession, subjects)
Moreover, profession_has_subject, subject_has_subject - directly connect the tables of profession, subjects