Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Does anyone know if other database have something equivalent to MRG_MYISAM (aka the MERGE table type/storage engine)?

I know about fragmenting, but this is not quite the same AFAIK. We're using MRG_MYISAM to avoid large amounts of duplicate data across customer specific databases, so MRG_MYISAM is perfect.

That said, I'd like to know if there are equivalent things in other DBs, particularly other open source DBs.

share|improve this question

closed as not constructive by RolandoMySQLDBA, Mark Storey-Smith, Max Vernon, Marian, Derek Downey Apr 22 '13 at 14:54

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

add comment

1 Answer 1

From the description of the MERGE table type in the MySQL documentation at https://dev.mysql.com/doc/refman/5.0/en/merge-storage-engine.html it appears this is similar to creating a view that uses a UNION statement to connect multiple tables, either from a single database or multiple databases.

In Microsoft SQL Server (which admittedly is not open-source), you could do something like this:

CREATE VIEW MergedTablesView
AS
    SELECT Field1, Field2, Field3, ...
    FROM Database1.dbo.Table1
    UNION
    SELECT Field1, Field2, Field3, ...
    FROM Database1.dbo.Table2
    UNION
    SELECT Field1, Field2, Field3, ...
    FROM Database1.dbo.Table3

    ...

The UNION statement will remove duplicate rows from the result set, which seems to be your primary requirement.

I'm certain other database engines, including PostgreSQL, also implement the UNION keyword in a very similar manner. Here is the PostgreSQL Manual on the UNION statement.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.
{"cc_re__cc_re__cc_by_sa_3_0": ["        <li><a href=\"http://area51.stackexchange.com\" title=\"proposing new sites in the Stack Exchange network\">Area 51</a></li>\r\n                        <li><a href=\"http://careers.stackoverflow.com\">Stack Overflow Careers</a></li>\r\n                    \r\n                </ol>\r\n            </td>\r\n    </tr>\r\n</table>\r\n                </div>\r\n            </div>\r\n\r\n            <div id=\"copyright\">\r\n                site design / logo &#169; 2014 stack exchange inc; user contributions licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc by-sa 3.0</a> \r\n                with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\r\n            </div>\r\n            <div id=\"svnrev\">\r\n                rev 2014.7.23.1723\r\n            </div>\r\n            \r\n        </div>\r\n    </div>\r\n    <noscript>\r\n        <div id=\"noscript-warning\">Database Administrators Stack Exchange works best with JavaScript enabled<img src=\"http://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif\" alt=\"\" class"], "copyright__copyright__copyright": [" UNION\n    SELECT Field1, Field2, Field3, ...\n    FROM Database1.dbo.Table3\n\n    ...\n\nThe UNION statement will remove duplicate rows from the result set, which seems to be your primary requirement.\n\nI'm certain other database engines, including PostgreSQL, also implement the UNION keyword in a very similar manner. Here is the PostgreSQL Manual on the UNION statement.\n\nshare|improve this answer\nadd comment\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question.", " UNION\n    SELECT Field1, Field2, Field3, ...\n    FROM Database1.dbo.Table3\n\n    ...\n\nThe UNION statement will remove duplicate rows from the result set, which seems to be your primary requirement.\n\nI'm certain other database engines, including PostgreSQL, also implement the UNION keyword in a very similar manner. Here is the PostgreSQL Manual on the UNION statement.\n\nshare|improve this answer\nadd comment\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question.", " UNION\n    SELECT Field1, Field2, Field3, ...\n    FROM Database1.dbo.Table3\n\n    ...\n\nThe UNION statement will remove duplicate rows from the result set, which seems to be your primary requirement.\n\nI'm certain other database engines, including PostgreSQL, also implement the UNION keyword in a very similar manner. Here is the PostgreSQL Manual on the UNION statement.\n\nshare|improve this answer\nadd comment\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question."]}