def select_as_memdb(self, table_name, columns=None, where=None, extra=None):
table_schema = self.schema_extractor.fetch_table_schema(table_name)<EOL>memdb = connect_memdb()<EOL>memdb.create_table_from_tabledata(<EOL>self.select_as_tabledata(table_name, columns, where, extra),<EOL>primary_key=table_schema.primary_key,<EOL>index_attrs=table_schema.index_list,<EOL>)<EOL>return memdb<EOL>
Get data in the database and return fetched data as a
in-memory |SimpleSQLite| instance.

:param str table_name: |arg_select_table_name|
:param list columns: |arg_select_as_xx_columns|
:param where: |arg_select_where|
:type where: |arg_where_type|
:param str extra: |arg_select_extra|
:return:
    Table data as a |SimpleSQLite| instance that connected to in
    memory database.
:rtype: |SimpleSQLite|
:raises simplesqlite.NullDatabaseConnectionError:
    |raises_check_connection|
:raises simplesqlite.TableNotFoundError:
    |raises_verify_table_existence|
:raises simplesqlite.OperationalError: |raises_operational_error|