Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Page title capitalization

What's the difference between concept_set and concept_set_derived tables?

Humans (you and me) should only edit set relationships in the concept_set table. These relationships are then programmatically burst into the concept_set_derived table for "real world" use.

  • Humans use concept_set
  • Computers use concept_set_derived

Understanding by example

Here's an example (using made-up concepts). Suppose we want to relate the following three concepts using concept sets:

...

The third item in the list above is derived from the manually defined relationships.

Why all this monkey business with concept_set_derived?

The concept_set table is displayed in the Old Nasty Data Model Page. Concept_set_derived is considered part of the business stuff that's needed to make OpenMRS work. The bottom line is that bursting out implicit relationships into a concept_set_derived table prevents the application from having to calculate all of the implicit relationships in real time. Likewise, we don't want to burden humans with having to explicitly define all of these implicit relationships (why create three relationships when two says it all — in the example above).