def parse_header(header):
    """Parses a db header and returns a dictionary mapping column names to type
    and position.

    """
    columns = (header.rstrip()).split('\t')[1:]

    schema = {}
    for i, column in enumerate(columns):
        name, data_type = column.split(':')
        schema[name] = (i, data_type)

    return schema