def declarative_base(decl_type, name, cls, metaclass, **kwargs):
    """Create base class for defining new database classes.

    :param decl_type: DeclarativeType enum value.
    :param name: Metaclass name
    :param cls: Base class(es) for returned class
    :param metaclass: Metaclass for registering type information
    """
    bases = cls if isinstance(cls, tuple) else (cls, )
    class_dict = dict(decl_type=decl_type)
    class_dict.update(kwargs)

    return metaclass(name, bases, class_dict)