星型架构建模 Azure Synapse
Star Schema modeling Azure Synapse
根据此文档 Primary key, foreign key, and unique key in Synapse SQL pool,Azure Synapse
不支持 foreign keys
。
因此,如何在 Azure Synapse
中建模 star schema
?还是 Azure Synapse
上没有必要?
根据您链接的文档:
Having primary key and/or unique key allows Synapse SQL pool engine to
generate an optimal execution plan for a query
After creating a table with primary key or unique constraint in
Synapse SQL pool, users need to make sure all values in those columns
are unique. A violation of that may cause the query to return inaccurate result.
从上述内容中得出的结论是 Synapse DB 不支持约束。 PK 和 Unique “约束”纯粹是为了查询性能优化,实际上并不强制执行唯一性。
根据此文档 Primary key, foreign key, and unique key in Synapse SQL pool,Azure Synapse
不支持 foreign keys
。
因此,如何在 Azure Synapse
中建模 star schema
?还是 Azure Synapse
上没有必要?
根据您链接的文档:
Having primary key and/or unique key allows Synapse SQL pool engine to generate an optimal execution plan for a query
After creating a table with primary key or unique constraint in Synapse SQL pool, users need to make sure all values in those columns are unique. A violation of that may cause the query to return inaccurate result.
从上述内容中得出的结论是 Synapse DB 不支持约束。 PK 和 Unique “约束”纯粹是为了查询性能优化,实际上并不强制执行唯一性。