Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Aakashdata
New Contributor

Synthethic keys

Do you really think the formation of a synthetic keys considered bad in Qlikview? If not please can you explain me.

6 Replies
Somasundaram
Contributor III

Re: Synthethic keys

 

Formation of synthetic keys is not bad, but, It's poor data model.Try to eliminate the synthetics keys.

 


-Somasundaram
rinugour
New Contributor

Re: Synthethic keys

In QlikView, if there are several fields in common between two or more than two tables then a table containing the set of composite keys is made. This table is identified by a synthetic key ($Synkey).

However, this approach by QlikView to manage overriding fields consider as a sign of poorly designed data model. The user must check for logical errors that in turn reflects into the script not making a good data model.

Shubham_Deshmukh
Valued Contributor

Re: Synthethic keys

NO its not bad, though it is sign of poor data model but some times it plays an important role where you don't want data islands.

Depends on situation.

rinugour
New Contributor

Re: Synthethic keys

In QlikView, if there are several fields in common between two or more than two tables then a table containing the set of composite keys is made. This table is identified by a synthetic key ($Synkey).

However, this approach by QlikView to manage overriding fields consider as a sign of poorly designed data model. The user must check for logical errors that in turn reflects into the script not making a good data model.

MVP
MVP

Re: Synthetic keys

Synthetic keys are not inherently bad -- in fact they are a good solution if you truely need a composite key between two tables -- however good data model design will in most cases eliminate the need for a composite key. 

However, unintended synthetic keys are usually a sign of a scripting error (eg not dropping a temporary work table) or a poorly thought through model design. And nested synthetic keys and associative loops are always a bad thing, as it is very hard to get the expected results in such as model and performance may be very poor as well.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Highlighted
Support
Support

Re: Synthetic keys

Below is a Design Blog post from Henric Cronstrom regarding Synthetic Keys that may be useful as well:

Synthetic Keys

Regards,
Brett

To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.