I've run into a little bit of a conundrum. My database tracks Effects, Terrains, and Terrain Lists. An "effect" is defined as a change of state of an object that is located on a particular terrain. "Terrain" is defined as the location of an object. A "Terrain List" is simply a list of multiple terrains.
Example 1: Remove virus.exe from ComputerA. "Remove" (change of state) is the Effect I want on virus.exe (the object) that is installed on ComputerA (the terrain).
Example 2: Remove virus.exe from Computer_List_001. "Remove" (change of state) is the Effect I want on virus.exe (the object) that is installed on the computers listed on Computer_List_001 (the terrain), which could have well over 1000 computers.
My "Effect" form has a combo-box called "cbo_Terrain" where I choose the name of the Terrain entity. This is sufficient for Effects that require only one Terrain Entity (such a single Computer Name or IP address, as in Example 1). This is where I run into my problem: what I do for Effects that require Terrain Lists for multiple Terrain entities (as in Example 2)? Not every Terrain entity is going to be added to a Terrain List, but a Terrain Entity may very well be on multiple different Terrain Lists.
I have 1 table for my Effects:
Example 1: Remove virus.exe from ComputerA. "Remove" (change of state) is the Effect I want on virus.exe (the object) that is installed on ComputerA (the terrain).
Example 2: Remove virus.exe from Computer_List_001. "Remove" (change of state) is the Effect I want on virus.exe (the object) that is installed on the computers listed on Computer_List_001 (the terrain), which could have well over 1000 computers.
My "Effect" form has a combo-box called "cbo_Terrain" where I choose the name of the Terrain entity. This is sufficient for Effects that require only one Terrain Entity (such a single Computer Name or IP address, as in Example 1). This is where I run into my problem: what I do for Effects that require Terrain Lists for multiple Terrain entities (as in Example 2)? Not every Terrain entity is going to be added to a Terrain List, but a Terrain Entity may very well be on multiple different Terrain Lists.
I have 1 table for my Effects:
- "tbl_Effects" (pk: Effect_ID): One record for each Effect; has field "Terrain_Name" that the combo-box on my "Effects" form controls.
- "tbl_Terrain" (pk: Terrain_ID): One record for each Terrain entity; the combo-box on my "Effects" form is populated based off this table.
- "tbl_TerrainLists" (pk: TerrainList_ID): One record for each Terrain List
- "jtb_TerrainLists_Terrain" (pk: TerrainList_Terrain_ID, fk: Terrain_ID, fk: TerrainList_ID): Join-table to join multiple Terrain entities to multiple Terrain Lists