Page MenuHomePhorge

Support for single database per application deployment
Closed, InvalidPublic

Asked by brainchild on Jul 26 2023, 22:35.

Details

MySQL is a database management system that follows an extremely common design pattern, that within each database cluster, an administrator may provision one or more databases, each corresponding to a deployed application.

An applications instance opens connections to an appropriate database, through which it may read, write, create, and drop tables or other schema types.

Provisioning of a database and its use by an application are considered as separate administrative activities occurring within separate spheres.

A database administrator, a person or tool responsible for administrating a database cluster, should provision each database with a unique name within the cluster, and with appropriate permissions. Name selection occurs within the context of an existing database cluster, which may include other databases, and entails the responsible use of the namespace, for preventing collisions of database names, including for separate deployment instances of the same application package.

In turn, an application administrator is responsible for provisioning an application to connect to the appropriate database, by providing the cluster, name, and credentials. Applications are capable of connecting to any database through configuration of appropriate application parameters.

The pattern, and the constraints understood within it, are quite widespread, and indeed nearly universal.

Applications assume no control over a database cluster outside of the designated operations, within a designated database, relevant to managing schema and data. Clusters are subject to no constraints except the availability of a database for each application deployment with suitable permissions.

Presently, Phorge is not following such design principles.

One consequence was discussed in Q67, but the ubiquity of the general principles provides that the present design choices would have far more widespread ramifications.

Suggested is adapting Phorge to follow the common design pattern. When provisioned, the application would be associated with a single existing database, the cluster, name, and credentials given as configuration parameters.

Answers

avivey
Updated 512 Days Ago

This is not a reasonable "suggestion".

See https://we.phorge.it/book/flavor/article/so_many_databases/ for details about the current DB architecture, and https://we.phorge.it/book/contrib/article/feature_requests/ on how suggest features.

valerio.bozzolan
Updated 512 Days Ago

We are sorry if we are not able to find a specific volunteer that will work on this (and for free).

Just to clarify that of course you are encouraged to try to hack Phorge and fork it to fit for your needs, to try to put all the 400+ tables in a single database.

Probably here you can find some useful files, and then dig more:

https://we.phorge.it/source/phorge/browse/master/src/infrastructure/storage/connection/

New Answer

Answer

This question has been marked as closed, but you can still leave a new answer.