Hierarchical Data structure

Each of us in his work, daily encounters hierarchical data structures.
Organization of file storage, data categorization, etc.
I would like to discuss the possibility of adding standard widgets to display structured data with drag and drop support. And also in connection with the release of the new database manager, the generation of a service table describing the hierarchy structure (Closure Table in my opinion is the most universal).

Questions of this kind periodically arise on the forum:

I would certainly support an effort to display a tree structure - if appropriate to the hierarchical database.

I believe it would save an enormous amount of support time in situations where changes to the databases are going to be reflected in the appearance/utilization the data that is constantly being changed or requiring new additions (for instance where product pricing or promotions are constantly being changed in e-commerce).

It would also greatly enhance the ability of web designers without database-technical training to visualize the data in tree-form and assist in designing the menu structure of a website.

I’ll repeat what was mentioned in the original thread regarding this subject and say that Wappler is not a replacement for Magneto, Wordpress, etc, nor should it be. The functionality you want is simply not viable within Wappler and I say once again it would be a waste of many hours of work to try and replicate such a feature, it is not the job of Wappler to do this, yes it would be ‘nice’ but feasible it is not. There is no such provision in any web development platform as far as I am aware? Its all too easy to say Wappler should do this, and the reasons why you need it. BUT other tools are available to visualise your database structures. You can then use Wappler to work with the DB’s output and display it in whatever way you want as you require. There is no one solution fits all, some learning will be required on the basics of how RDBS operate, for that there is a multitude of great educational resources on YouTube. Such as Caleb Curry’s excellent series on MySQL:

6 Likes

Nobody can replace this guy…not even Wappler.

image

6 Likes

:smile:

Hey @Teodor and @George…do you guys think I can get a totally undeserved badge like “Meme Master” or something similar? I know you guys give them for free just because.

Sorry to derail this topic…but as it’s not going to get anywhere I might as well do something with it :smiley:

4 Likes

Best serious but not serious forum ever.

2 Likes

I vote for your Meme Master badge, you deserve it, haha

2 Likes

image

6 Likes

Congrats Jon, lonely there, luckily there are no “Long Winded old fart” badges, i think a few members could get one. “Dog with a bone” badge i could think of a few recipients, and this is why I don’t have the power to make badges, haha

3 Likes

Congratulations @JonL !

Returning to the topic of the post, I share @Dave opinion. This is a specific functionality that you can easily do without, and that can be performed by specialized tools. For planning and design purposes, it is better to use third-party programs. In terms of creating queries and relationships between database tables, the current Wappler approach is already very good.

2 Likes

Wow nice badge you got Jon! :slight_smile:

2 Likes

I will have to up my game and proof I am worthy of it!

1 Like

I may not have put it correctly, it is clear that in the topic that I gave as an example, you need not a tree structure of tables in MySQL, but the display of a hierarchical structure in the web interface. for example using jquery treeview.

So you mean an AC component?

Yes, but not only that. This is just a matter for discussion.

  1. AC component (jquery treeview)
  2. on the server side, we define what structure we display in treeview: file structure, database table, JSON (rest api data).
    If we want to define a database table as data categorization:
  3. auto create Closure Table to this table / view to describe the hierarchy
    https://hsto.org/getpro/habr/post_images/aae/77e/8bd/aae77e8bd18c7a576b9903094edd698a.png

In my opinion this can remove a lot of routine tasks for displaying hierarchical structures

Presenting a real hierarchical data that is fully nested recursively present many challenges.

The database design with self referencing table is easy, but then:

  • querying the table with recursive query
  • display a recursive data? It can’t be done with simple repeater because it is all nested so you need a tree like component
  • the the maintaining of the data - you shouldn’t have deadlocks in the self references otherwise your query’s will go forever
  • what happens if you delete a branch does all children go with it?

These are just a few of the challenges you will encounter when working with fully recursive hierarchical data.

And the worst is that your users actually don’t understand the complex structure and will often make mistakes of maintaining it - kike crating deadloops per mistake.

So saying all this and saving you a lot of trouble it is better to keep hierarchies up to 2-3 levels max and make them usable.

3 Likes