MicroStrategy ONE

Relate tables: A unique case for relating attributes

While lookup tables store information about attributes, relate tables store information about the relationship between two attributes. Relate tables contain the ID columns of two or more attributes, thus defining associations between them. Relate tables are often used to create relationships between attributes that have a many-to-many relationship to each other.

With attributes whose direct relationship is one-to-many—in which every element of a parent attribute can relate to multiple elements of a child attribute—you define parent-child relationships by placing the ID column of the parent attribute in the lookup table of the child attribute. The parent ID column in the child table is called a foreign key. This technique allows you to define relationships between attributes in the attributes' lookup tables, creating tables that function as both lookup tables and relate tables as shown in the following diagram:

In the case of a many-to-many relationship—in which multiple elements of a parent attribute can relate to multiple elements of a child attribute—you must create a separate relate table as shown in the following diagram: