- Feb 22, 2005
- 7,280
- 0
- 0
I'm working on a very basic call tracking system at work, so we can specify what kind of calls we're getting throughout the day. I want to make it a branched type of system, so you would have several level 1 options, you select it and go to the level 2 options JUST for the one you chose, then so on to level 3.
If there's 4 level 1, and 4 for each of those, then 4 for each of those, you're looking at 4 + 16 + 64 = 84 total options when you drill down through the tree.
My problem is how do I design the database to hold these? I could just hardcode them into my page, but I'd like to give my manager the ability to create a new one, insert it to the database, and have it automatically show up.
What's the best way to design the database? I was thinking a table for each of the levels, and for each option it would have the text, plus what previous option had to be chosen at the prior level to trigger it. I'm sure I could code a loop for that pretty easily, I'm just new to database structures like this (usually handle standard ecom inventory databases).
If there's 4 level 1, and 4 for each of those, then 4 for each of those, you're looking at 4 + 16 + 64 = 84 total options when you drill down through the tree.
My problem is how do I design the database to hold these? I could just hardcode them into my page, but I'd like to give my manager the ability to create a new one, insert it to the database, and have it automatically show up.
What's the best way to design the database? I was thinking a table for each of the levels, and for each option it would have the text, plus what previous option had to be chosen at the prior level to trigger it. I'm sure I could code a loop for that pretty easily, I'm just new to database structures like this (usually handle standard ecom inventory databases).
