def create_metaRd_db(dbcon):
    """ Create an database to store R help pages.

    dbcon: database connection (assumed to be SQLite - may or may not work
           with other databases)
    """
    dbcon.execute(
        """
CREATE TABLE package (
name TEXT UNIQUE,
title TEXT,
version TEXT,
description TEXT
);
"""
        )
    dbcon.execute(
        """
CREATE TABLE rd_meta (
id INTEGER, file TEXT UNIQUE, name TEXT, type TEXT, title TEXT, encoding TEXT,
package_rowid INTEGER
);
"""
        )
    dbcon.execute('\nCREATE INDEX type_idx ON rd_meta (type);\n')
    dbcon.execute(
        '\nCREATE TABLE rd_alias_meta (\nrd_meta_rowid INTEGER, alias TEXT\n);\n'
        )
    dbcon.execute('\nCREATE INDEX alias_idx ON rd_alias_meta (alias);\n')
    dbcon.commit()
