# phpman > man > DBD::Mem(3pm)

## NAME
    [DBD::Mem](https://www.chedong.com/phpMan.php/perldoc/DBD%3A%3AMem/markdown) - a DBI driver for Mem & MLMem files

## SYNOPSIS
     use DBI;
     $dbh = DBI->connect('dbi:Mem:', undef, undef, {});
     $dbh = DBI->connect('dbi:Mem:', undef, undef, {RaiseError => 1});

     # or
     $dbh = DBI->connect('dbi:Mem:');
     $dbh = DBI->connect('DBI:Mem(RaiseError=1):');

    and other variations on connect() as shown in the DBI docs and <[DBI::DBD::SqlEngine](https://www.chedong.com/phpMan.php/perldoc/DBI%3A%3ADBD%3A%3ASqlEngine/markdown)
    metadata|[DBI::DBD::SqlEngine](https://www.chedong.com/phpMan.php/perldoc/DBI%3A%3ADBD%3A%3ASqlEngine/markdown)/Metadata>.

    Use standard DBI prepare, execute, fetch, placeholders, etc., see "QUICK START" for an example.

## DESCRIPTION
    [DBD::Mem](https://www.chedong.com/phpMan.php/perldoc/DBD%3A%3AMem/markdown) is a database management system that works right out of the box. If you have a standard
    installation of Perl and DBI you can begin creating, accessing, and modifying simple database
    tables without any further modules. You can add other modules (e.g., [SQL::Statement](https://www.chedong.com/phpMan.php/perldoc/SQL%3A%3AStatement/markdown)) for
    improved functionality.

    [DBD::Mem](https://www.chedong.com/phpMan.php/perldoc/DBD%3A%3AMem/markdown) doesn't store any data persistently - all data has the lifetime of the instantiated
    $dbh. The main reason to use [DBD::Mem](https://www.chedong.com/phpMan.php/perldoc/DBD%3A%3AMem/markdown) is to use extended features of [SQL::Statement](https://www.chedong.com/phpMan.php/perldoc/SQL%3A%3AStatement/markdown) where
    temporary tables are required. One can use [DBD::Mem](https://www.chedong.com/phpMan.php/perldoc/DBD%3A%3AMem/markdown) to simulate "VIEWS" or sub-queries.

    Bundling "[DBD::Mem](https://www.chedong.com/phpMan.php/perldoc/DBD%3A%3AMem/markdown)" with DBI will allow us further compatibility checks of [DBI::DBD::SqlEngine](https://www.chedong.com/phpMan.php/perldoc/DBI%3A%3ADBD%3A%3ASqlEngine/markdown)
    beyond the capabilities of [DBD::File](https://www.chedong.com/phpMan.php/perldoc/DBD%3A%3AFile/markdown) and [DBD::DBM](https://www.chedong.com/phpMan.php/perldoc/DBD%3A%3ADBM/markdown). This will ensure DBI provided basis for
    drivers like [DBD::AnyData2](https://www.chedong.com/phpMan.php/perldoc/DBD%3A%3AAnyData2/markdown) or [DBD::Amazon](https://www.chedong.com/phpMan.php/perldoc/DBD%3A%3AAmazon/markdown) are better prepared and tested for not-file based
    backends.

### Metadata
    There're no new meta data introduced by "[DBD::Mem](https://www.chedong.com/phpMan.php/perldoc/DBD%3A%3AMem/markdown)". See "Metadata" in [DBI::DBD::SqlEngine](https://www.chedong.com/phpMan.php/perldoc/DBI%3A%3ADBD%3A%3ASqlEngine/markdown) for
    full description.

GETTING HELP, MAKING SUGGESTIONS, AND REPORTING BUGS
    If you need help installing or using [DBD::Mem](https://www.chedong.com/phpMan.php/perldoc/DBD%3A%3AMem/markdown), please write to the DBI users mailing list at
    <mailto:<dbi-users@perl.org>> or to the comp.lang.perl.modules newsgroup on usenet. I cannot
    always answer every question quickly but there are many on the mailing list or in the newsgroup
    who can.

    DBD developers for DBD's which rely on [DBI::DBD::SqlEngine](https://www.chedong.com/phpMan.php/perldoc/DBI%3A%3ADBD%3A%3ASqlEngine/markdown) or [DBD::Mem](https://www.chedong.com/phpMan.php/perldoc/DBD%3A%3AMem/markdown) or use one of them as an
    example are suggested to join the DBI developers mailing list at <mailto:<dbi-dev@perl.org>> and
    strongly encouraged to join our IRC channel at <irc://irc.perl.org/dbi>.

    If you have suggestions, ideas for improvements, or bugs to report, please report a bug as
    described in DBI. Do not mail any of the authors directly, you might not get an answer.

    When reporting bugs, please send the output of "$dbh->mem_versions($table)" for a table that
    exhibits the bug and as small a sample as you can make of the code that produces the bug. And of
    course, patches are welcome, too :-).

    If you need enhancements quickly, you can get commercial support as described at
    <<http://dbi.perl.org/support/>> or you can contact Jens Rehsack at <rehsack@cpan.org> for
    commercial support.

## AUTHOR AND COPYRIGHT
    This module is written by Jens Rehsack < rehsack AT cpan.org >.

     Copyright (c) 2016- by Jens Rehsack, all rights reserved.

    You may freely distribute and/or modify this module under the terms of either the GNU General
    Public License (GPL) or the Artistic License, as specified in the Perl README file.

## SEE ALSO
    DBI for the Database interface of the Perl Programming Language.

    [SQL::Statement](https://www.chedong.com/phpMan.php/perldoc/SQL%3A%3AStatement/markdown) and [DBI::SQL::Nano](https://www.chedong.com/phpMan.php/perldoc/DBI%3A%3ASQL%3A%3ANano/markdown) for the available SQL engines.

    [SQL::Statement::RAM](https://www.chedong.com/phpMan.php/perldoc/SQL%3A%3AStatement%3A%3ARAM/markdown) where the implementation is shamelessly stolen from to allow DBI bundled
    Pure-Perl drivers increase the test coverage.

    [DBD::SQLite](https://www.chedong.com/phpMan.php/perldoc/DBD%3A%3ASQLite/markdown) using "dbname=:memory:" for an incredible fast in-memory database engine.

