I don't know if it has another term for it but I want to basically create a directorial database having different databases in one major database and each containing their respective tables. Is there any way to do that in MySQL?
Something like this:
I don't know if it has another term for it but I want to basically create a directorial database having different databases in one major database and each containing their respective tables. Is there any way to do that in MySQL?
Something like this:
No, it is not possible to make a nested database in MySQL.
MySQL supports a simple and flat structure. You cannot nest databases (and of course not tables, nor fields).
If you want to group databases together in MySQL for any reason (like availability), then you can use a common prefix when naming them. For example, if you want to develop an HRM (Human Resource Management System), and it has let's say 3 parts namely: Inventory, Attendance and Leaves, then you can have the following database:
CREATE DATABASE HRM_INVENTORY;)CREATE DATABASE HRM_ATTENDANCE;)CREATE DATABASE HRM_LEAVES;)Now regarding the image that you have shared in your question, PHPMyAdmin only tries to find common prefixes and group them together to make them easy to find for the user. For example if you create the 3 databases I just mentioned, PHPMyAdmin will group them together under HRM and if you collapse it, you can see all the three.