Foreign Key constraints Synapse Azure
Asked Answered
O

2

6

Am currently creating a datawarehouse in Azure Synapse, however Synapse does not allow for the creation of foreign keys. This is vital for referential integrity between the fact and dimension table. Does anyone have any suggestions as to what the alternatives are in synapse to enforce a PK FK relationship?

Opsis answered 20/5, 2020 at 11:9 Comment(0)
L
3

I searched about this topic and I found that the focus of Synapse is performance and not integrity reinforcement. We can create primary keys and structure the star schema with fact, dimensions and code join tables between them.

It was confused me too until I make this tutorial and read this carefully.

Load Contoso retail data to Synapse SQL

Leonard answered 2/7, 2020 at 14:52 Comment(0)
S
0

In a star schema any referential integrity should be enforced within the ETL tool used to load the data and not in the DB itself. Some DBs support logical FKs that can help with query execution plans but they should never be physicalised

Stereometry answered 3/8, 2020 at 16:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.