[Date Prev] [Date Next] | [Thread Prev] [Thread Next] | [Date Index] [Thread Index] |
Multiple Dependencies (as requested)
|
All involved, please let me know what you think of this below. I believe it will be the optimal level of multiple dependency logic for our application allowing you to form complex AND and OR routines, rather than just OR routines. CREATE TABLE EVENTS ( EVENT_ID INT AUTO_NUMBER PRIMARY KEY, PHYSICAL_ID VARCHAR(32), LOGICAL_ID VARCHAR(32), DEVICE_HOSTNAME VARCHAR(128), DEVICE_IP VARCHAR(15), DESCRIPTION VARCHAR(64), VARIABLE VARCHAR(16), VALUE INT, SERVICE VARCHAR(16), LAST_UPDATED INT ); CREATE TABLE EVENT_DEPENDENCIES ( EVENT_ID INT, PARENT_IP VARCHAR(15), PARENT_VARIABLE VARCHAR(16), GROUP_ID INT, RELATIONSHIP CHAR(1) ); CREATE TABLE DENDENCY_GROUPS ( GROUP_ID INT, RELATIONSHIP CHAR(1) ); CREATE TABLE EVENT_HISTORY ( HISTORY_ID INT AUTO_NUMBER PRIMARY KEY, PHYSICAL_ID VARCHAR(32), LOGICAL_ID VARCHAR(32), DEVICE_HOSTNAME VARCHAR(128), DEVICE_IP VARCHAR(15), DESCRIPTION VARCHAR(64), VARIABLE VARCHAR(16), VALUE INT, SERVICE VARCHAR(16), STATUS_BEGIN INT, STATUS_END INT, LAST_UPDATED INT ); Below, dependency will be active ONLY if (10.3 & 10.2) are active OR 10.1 OR 10.4. 100 205.215.10.3 ICMP 1 A 100 205.215.10.2 ICMP 1 A 100 205.215.10.1 ICMP 2 O 100 205.215.10.4 ICMP 2 O 1 O 2 O Make these changes to the dependency groups... 1 A 2 A ...and now the dependency will only be active if (10.3 AND 10.2) AND (10.1 OR 10.4) are active. Finally, what most people will do... 100 205.215.10.3 ICMP NULL O 100 205.215.10.2 ICMP NULL O will make the dependency active if either 10.3 or 10.2 are active. since no grups need to be made, we can leave them null, or make a group if we want. The relationship of each first group really does not matter...if it is 'A' it is treated like (TRUE + ARGUMENT) and if it is 'O' it is treated like 'FALSE + ARGUMENT' Thank you, Jonathan A. Zdziarski Sr. Systems Administrator Netrail, inc. 888.NET.RAIL x240 http://www.netrail.net |