Hello,


In my database, all objects of a type have binary attributes that are not mutually exclusive.


for simplifying a well difined logical operation, i've add an supplemental attribute called AllBinaryAttrib thats depends on all existing attributes with the following rule:
AllBinaryAttrib is a calculation that is the product of all representation of the attributes following the rules (yes,no) = (attribute prime number, 1):


AllBinaryAttrib Attr1 Attr2 Attr3 Attr4 Attr5 Attr6 Attr7 Attr8 Attr9 Attr10
product Attr(i) 2 3 5 7 11 13 17 19 23 27


example: value of (no,no,yes,no,no,yes,yes,no,no,no) = 1*1*5*1*1*13*17*1*1*1=5*13*17=1105.


the AllBinaryAttrib attribute allows me to verify in a single operation if the logical AND is true by testing the product divides AllBinaryAttrib
(Attr1 and Attr4 and Attr7)? <=> (2 *7*17 divides AllBinaryAttrib)?


My question:


Can someone find a similar set of rules and attributes value attribution (not necessarily the same as above) whereby i could test the logical OR in one operation and without using a set of nested if function (as that is what i want to avoid)
(Attr1 or Attr4 or Attr7)? <=> (?)?
any idea ?