Are there some more in-depth articles on dynamic model?

Hello beikov, thank you for your explanation and advice.

In my idea, a program instance corresponds to only one schema (database), and in this instance, a customer group (such as a school class) will share this schema. Only specific customers (such as teachers) can create and modify tables. So after a customer causes the DDL operation to be performed, all Hibernate sessions of this instance need to be updated to adapt to the new data structure. (I read some posts and found that every time the data structure changes, the SessionFactory of Hibernate needs to be recreated. I don’t know how much impact this recreation has on the singleton-based Spring architecture.)

Since the needs of each customer group are different, I can’t implement too many static tables. Most tables are created on their demand.

As for the data structure itself (the metadata mentioned above), it can be stored in static tables in the same database, or it can be stored in files on the server (since this part of data is small and does not change frequently).


Useful articles I found so far:
Programmatically adding HBM mapping to the configuration
Dynamically adding entities to hibernate
Domain models and metadata (from section “Creating dynamic applications” to the end)