G
GB
I think this is a tough problem to solve, and I'm not sure if I have caused
the problem by the way I have captured my data; however, any assistance would
be great.
I have created a data table that has three fields to create the primary key.
There is one additional field at the moment that is used for sorting to
maintain a proper sequence.
The data table is created by generating a unique series of events to occur
that are then stored into the table, something like a map. To get from point
A to point B, the individual must pass through certain decision points. Each
path taken is unique and each path is given a designation. So path 1 may be
to go to points A, C, D, then B. Path 2 may be to go to points A, C, E, then
B. This is stored into the table like so:
Column 1: Path #
Column 2: Point in Path
Column 3: Order/sequence along the path.
1 A 1
1 C 2
1 D 3
1 B 4
2 A 1
2 C 2
2 E 3
2 B 4
Now what I would like to be able to do, is say if I enter the path A, C, D,
B to identify the path number associated with it. I have toyed with a few
ideas to accomplish this, but am wondering what the most expedient way to not
only establish this capability but to maintain it is. I.e., If additional
information/tables are needed from what I have entered, then I need to
"convert" the data, but I also need to add in the ability to create that new
data upon initial entry.
One idea I had was to create another table that has a primary key set to
just the path itself, so I would have one field that identifies the path #
and a second field that concatenates the path in the order traversed. So I
would have a table that looks like:
1; "A, C, D, B"
2; "A, C, E, B"
the ";" separates the two fields.
To circumvent the question of why I created the table I did. I need to
capture each point along the way in a field so that I can query the path
field to locate additional information about that point. Now why I didn't
create something else to pull the information back out the way I am trying to
get it? Well, I was thinking that there ought to be a way to pull the data
back out from the other direction without creating additional tables.
I've been trying to think of queries that could do this and to
programmatically go through and determine if the count of items for a path#
equals the count of records originally testing when testing the user list
against the entered list. This seems like a computer "intensive" operation
and may cause a lag time to the user that must be addressed. Would be better
if I could cut it off at the pass.
Another option I had considered but realized wouldn't work was to add a zero
operation to each path that contained the concatenated path; however, I also
realized that all the items in the path points are pulled from a table and I
have required that the path point must exist in the table to use the path
point. Therefore, a concatenated list of path points would not be in the
referenced table until added to that table, and would provide undesirable
results if not filtered out. I.e., would almost create more work than needed
to address this attribute.
So..... Got any ideas? Is the additional table having the path designation
and the concatenated path points the (or a) right way to go?
the problem by the way I have captured my data; however, any assistance would
be great.
I have created a data table that has three fields to create the primary key.
There is one additional field at the moment that is used for sorting to
maintain a proper sequence.
The data table is created by generating a unique series of events to occur
that are then stored into the table, something like a map. To get from point
A to point B, the individual must pass through certain decision points. Each
path taken is unique and each path is given a designation. So path 1 may be
to go to points A, C, D, then B. Path 2 may be to go to points A, C, E, then
B. This is stored into the table like so:
Column 1: Path #
Column 2: Point in Path
Column 3: Order/sequence along the path.
1 A 1
1 C 2
1 D 3
1 B 4
2 A 1
2 C 2
2 E 3
2 B 4
Now what I would like to be able to do, is say if I enter the path A, C, D,
B to identify the path number associated with it. I have toyed with a few
ideas to accomplish this, but am wondering what the most expedient way to not
only establish this capability but to maintain it is. I.e., If additional
information/tables are needed from what I have entered, then I need to
"convert" the data, but I also need to add in the ability to create that new
data upon initial entry.
One idea I had was to create another table that has a primary key set to
just the path itself, so I would have one field that identifies the path #
and a second field that concatenates the path in the order traversed. So I
would have a table that looks like:
1; "A, C, D, B"
2; "A, C, E, B"
the ";" separates the two fields.
To circumvent the question of why I created the table I did. I need to
capture each point along the way in a field so that I can query the path
field to locate additional information about that point. Now why I didn't
create something else to pull the information back out the way I am trying to
get it? Well, I was thinking that there ought to be a way to pull the data
back out from the other direction without creating additional tables.
I've been trying to think of queries that could do this and to
programmatically go through and determine if the count of items for a path#
equals the count of records originally testing when testing the user list
against the entered list. This seems like a computer "intensive" operation
and may cause a lag time to the user that must be addressed. Would be better
if I could cut it off at the pass.
Another option I had considered but realized wouldn't work was to add a zero
operation to each path that contained the concatenated path; however, I also
realized that all the items in the path points are pulled from a table and I
have required that the path point must exist in the table to use the path
point. Therefore, a concatenated list of path points would not be in the
referenced table until added to that table, and would provide undesirable
results if not filtered out. I.e., would almost create more work than needed
to address this attribute.
So..... Got any ideas? Is the additional table having the path designation
and the concatenated path points the (or a) right way to go?