views:

22

answers:

1

Let's say I have some parameters such as a,b,c, and I need to store the test results by changing them. The thing is that the the number of parameters will be keep increasing, so I can't keep them as static column.

For example :

Test 1 : a = 10, b = 20, c = 1
Test 2 : a = 11, b = 21, c = 11
Test 3 : a = 11, b = 20, c = 1
...
Test 1001 : d = 30

I thought about having a table for parameters as follows.

id  name value
1   a    10
2   b    20
3   c    1
4   a    11
5   b    21
6   c    11
...
100 d    30

And a table for using the option. The orders are not important.

id   usage
1    1-2-3
2    4-5-6
3    4-5-3

The problem for this approach is that the number of the option used for each test is not fixed. It can be 1, but it also can be 1-2-3-4-5-6-7.

Questions

  1. Is there any better method for this problem? Not using two tables or someting?
  2. If I have to use this method, how can I deal with the variable element problem? Use string or equivalent?
+1  A: 

Take a look at this discussion.

Damir Sudarevic