Query a database and return query result as a recarray

        Parameters
        ----------
        data_path : str
            Path to the database file
        extension : str
            Type of database, either sql or db

        Returns
        -------
        table : recarray
            The database query as a recarray

def _get_db_table(self, data_path, extension):
        """
        Query a database and return query result as a recarray

        Parameters
        ----------
        data_path : str
            Path to the database file
        extension : str
            Type of database, either sql or db

        Returns
        -------
        table : recarray
            The database query as a recarray

        """
        # TODO: This is probably broken
        raise NotImplementedError, "SQL and db file formats not yet supported"

        # Load table
        if extension == 'sql':
            con = lite.connect(':memory:')
            con.row_factory = lite.Row
            cur = con.cursor()

            with open(data_path, 'r') as f:
                sql = f.read()

            cur.executescript(sql)

        else:
            con = lite.connect(data_path)
            con.row_factory = lite.Row
            cur = con.cursor()

        cur.execute(self.subset)

        # Check that table is not empty
        db_info = cur.fetchall()
        try:
            col_names = db_info[0].keys()
        except IndexError:
            raise lite.OperationalError("Query %s to database %s is empty" %
                                        (query_str, data_path))

        # Convert objects to tuples
        converted_info = [tuple(x) for x in db_info]

        # NOTE: Using default value for Unicode: Seems better than checking
        # lengths.  Should we keep the type as unicode?
        dtypes=[type(x) if type(x) != unicode else 'S150' for x in db_info[0]]

        table = np.array(converted_info, dtype=zip(col_names, dtypes))
        con.commit()
        con.close()

        # Return a recarray for consistency
        # TODO: This should now be a pd.dataframe
        return table.view(np.recarray)