#1239 (ok 4.0) Let group tables/views into "folders"


Very often there's a large number of tables inside one database.
F.e., 20-30 tables may control site forum, ~ 10 tables may refer to search engine, etc.
Moving logical groups of tables into separate databases is often bad solution, 'cos: 1) complicates app portability, 2) many host providers limit DB number.

Sometimes there's table groups based on app logic.
F.e., some tables may contain "abstract" data, that must be accessible for daily customers only for reading.
During operations like GRANT privileges, Export & Import selecting those groups manually over & over again is inconvenient & error-prone.

The suggestion is to support "packing" similar tables into new PMA object, "folder" or "directory", stored on pma_db level.
A folder can contain tables/views & other folders.

When folder is "pma current object":

1. Its name appears in top div "serverinfo".
This div now displays [server name] > [db_name] > [folder(s) path] > [current object's name].

2. Only folders/tables/views directly nested in it are visible on "Structure" tab.

Selecting (checking on) folder on "Structure" tab for group operation means: do that operation for all its (direct & indirect) child objects.
For organizing existing databases, support moving tables between folders.
phpMyAdmin is 1-panel manager, so move interface may be:
1) check tables to move, on "Structure" tab,
2) Select in "submit_mult" element new option, "Move to folder",
3) When it's selected, display new <select> element filled with names of existing folders.

Maybe, the term "folder" should be replaced by "directory" or "table group".


  • Marc Delisle

    Marc Delisle - 2010-05-01

    There is already a feature that groups tables based on their name, did you have a look at it?

    $cfg['LeftFrameLight'] boolean
    Defines whether to use a select-based menu and display only the current tables in the left frame (smaller page). Only in Non-Lightmode you can use the feature to display nested folders using $cfg['LeftFrameTableSeparator']

    $cfg['LeftFrameTableSeparator'] string
    Defines a string to be used to nest table spaces. Defaults to '__'. This means if you have tables like 'first__second__third' this will be shown as a three-level hierarchy like: first > second > third. If set to FALSE or empty, the feature is disabled. NOTE: You should not use this separator at the beginning or end of a table name or multiple times after another without any other characters in between.

  • Arcadiy Fedushin

    Yes, requested feature is similar to existing one, but:

    1. Is more straightforward, inspires even newbies to use it.
    Existing one is more for experienced phpMyAdmin users,
    2. Is much more flexible.
    Supports hierarchical packing of existing databases that need support but contain tables with predefined names,
    3. "Moves idea" from left panel to all PMA,
    In existing situation, I can select tables in a group, but can't, for example, select all tables in database except forum & search-engine tables.
    BTW about their number: phpBB forum uses 62 tables!
    Even with $cfg['LeftFrameLight'] I see all of them on database's Structure tab, not only top-level.
    4. I think if new feature will be accepted, we should permit many-to-many linkage. So given table may be included in several groups, f.e. daily_backup, readable_by_group1, hidden_for_group2, etc. The only forbidden thing should be cyclic inheritance.
    Of course, many-to-many relations are not accessible with grouping tables based on their names.

  • Dániel Dékány

    lem9, you mention it already works with "__", but unfortunately that feature doesn't support tree-like presentation. You mention 'first__second__third' as an example, but all it does is putting all such tables under the 'first' folder; there will not be further sub-folders. Also, if I have a table called "first", PMA will not show it as the parent of the tables whose name starts with 'first__'. It will not even necessary show the "first" table next to the "first" folder, as if I have a 'firsthand' table, it will be inserted between them (because '_' comes after 'h').

    So, I think the RFE stands even if PMA will not support explicitly defined hierarchies, because it doesn't even support hierarchies defined by naming convention (i.e., using "__").

  • Marc Delisle

    Marc Delisle - 2012-11-12

    The upcoming 4.0 version displays a tree in the navigation panel. You can specify the table tree depth.

  • Marc Delisle

    Marc Delisle - 2012-11-12
    • priority: 5 --> 1
    • summary: Let group tables/views into "folders" --> (ok 4.0) Let group tables/views into "folders"
    • status: open --> open-fixed
  • Michal Čihař

    Michal Čihař - 2013-05-09
    • Status: open-fixed --> closed-fixed
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks