是否从mongodb中的多个集合创建视图?

是否从mongodb中的多个集合创建视图?,mongodb,Mongodb,SQL Server中的视图希望在mongodb中创建它 CREATE VIEW memplog AS SELECT recipient, originator, [text], create_date, sent_date FROM [smslog_01042018] UNION ALL SELECT recipient, originator,[text], create_date, sent_date

SQL Server中的视图希望在mongodb中创建它

CREATE VIEW memplog
AS
    SELECT
        recipient, originator, [text], create_date, sent_date   
    FROM
        [smslog_01042018]
    UNION ALL
    SELECT
        recipient, originator,[text], create_date, sent_date
    FROM
        [smslog_02042018]
    UNION ALL
    SELECT
        recipient, originator,[text], create_date, sent_date
    FROM
        [smslog_03042018]

您不能使用MongoDB进行联合类型的连接,因为它根本不受任何支持。在这种情况下,您确实需要更改现有的RDBMS结构以更好地适应引擎。事实上,即使在RDBMS中,联合也可能是一个坏主意,数据真的应该在同一个表/集合中,只需要一个额外的字段/属性来表示它的源。