BOOLEAN RELATIONSHIPS: HARD QUESTION
Date: Sun, 13 Jun 2004 16:50:26 GMT
Message-ID: <mB%yc.55554$Wc.1725284_at_twister2.libero.it>
I need to create a database for my company. We build machines and so we have a part list of the components.
I have created a model of the machine in which there is a list of components to be filled in order to complete the design scheme. Every machine will be composed by:
1 mandatory element of type "A" among the entire list of A type items 1 mandatory element of type "B" among the entire list of B type items 4 mandatory element of type "C" among the entire list of C type itemsN optional element of type "D" among the entire list of D type items
The problem is this. When you choose a specific element to fill the type "A"
box you can't then choose among all the items of list B to fill the type B
box but among those B elements that matches the selected A items.
As well the type C is influenced by the previous choices but in this case
the list must be differently selected for any combination of the chosen A
and B items.
The problem is creating a solid model of relationships in order to let the
user select among the only items that matches the previous ones.
Definitely I don't want to create rules into the source code.
The idea is giving them a mask in which, when they create a new item, they
can link it with OR, AND, NOT, XOR, ecc. relationship.
The problem for me is saving these rules. If just one "AND" relationship
between two items was allowed a new table with matching couples would be
enough, but in this case I should be able to implement a rule like:
The optional elements on the other side can be present or not, according to
the selected A, B, C items or to a combination of them all.
If you choose the item A38 in A AND B15 in B AND NOT C44 in C, then you
can select the optional element among this list.
Hard, hu?
Thank you for the time spent in reading and answering to this message.
Yours faithfully,
JacopoReceived on Sun Jun 13 2004 - 18:50:26 CEST