cancel
Showing results for 
Search instead for 
Did you mean: 

Primary key in IDT

former_member185138
Participant
0 Kudos

Hi Experts,

We are reporting over a database which have no primary ke.

Will it be a good idea to create it in Data foundation?

What are the best practices?

Accepted Solutions (1)

Accepted Solutions (1)

Joe_Peters
Active Contributor

That's a pretty broad question, so here's an equally broad answer....

PKs in the data foundation help the query engine build SQL correctly, particularly with complex models.

You can tag a column in IDT as being a PK even if it's not designated as such in the physical table. Conversely, a physical table can have a PK and not be tagged as such in the data foundation.

It's a good idea to identify PKs if they exist. but not absolutely necessary for a universe to function.

Answers (1)

Answers (1)

former_member193452
Active Participant

Best Practice is to use keys for optimization.

check out Index awareness techniques here:

https://archive.sap.com/documents/docs/DOC-8461