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

    1 answer 1

    need a call that returns the JSON required by d3 to work.

    Additionally, d3 allows you to handle various types of files and has built-in functions for this, for example d3.csv. In other words, if you add data to csv, you can process it with d3 directly.

    However, you should be careful with this in some browsers - Chrome, for example, considers this a Cross Origin Request and gives an error.

    • Is it really impossible to do without JSON, given that I used SPRING DATA JPA to work with the database ??? @ Mr. Brightside - Nadezhda
    • I'm afraid not. Either JSON or JSON array, or some file types. Here is a link describing the types of data that can be fed to d3. - Mr. Brightside
    • And how, then, does the connection between the objects remain? If we just pass an array of objects? - Nadezhda
    • From the useful that I found quickly and, perhaps, it will be useful to you at least as a starting point: a document describing how to access Spring Data via REST, thereby obtaining JSON. - Mr. Brightside
    • @Nadezhda are you talking about real-time building? Or do you mean how the interconnected things in the database will be interconnected on the chart? here your question can be interpreted in two ways - Mr. Brightside