|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Trees vs. Tables
Good Day All !
I haven't really had any experience with Trees. And, I've got a problem that I see can be tackled in either one of two ways - using Trees or Tables in the DB. Here's the problem: I've got a threaded list, but it can only go two deep. Here's what it looks like : --> AD 1 ------> Question 1 -----------> Answer 1 -----------> Answer 2 ------> Question 2 --> AD 2 --> AD 3 Essentially, people either ask a question or respond to a question. And, that's as far as it goes. I'm looking for some advice from those of you who've worked with this kind of thing more. Would it be wiser/more efficient/easier to implement this using a three table model ? 1) ADs 2) Questions 3) Answers When I display them, the appropriate Ads, Questions, and Answers must be visually connected. Here is some extra info..... both questions and answers have only 3 fields in common with the 15 fields in my ADs table. I've been sitting on the fence on this one. Thoughts anyone ? Thanks all ! Syl |
|
#2
|
||||
|
||||
|
RE: Trees vs. Tables
do you feel comfortable doing recursive joins? I personal don't so I tend to go the tables route.
|
|
#3
|
|||
|
|||
|
RE: Trees vs. Tables
That is exactly why I was thinking of doing it with the tables. In many ways, it would make things simpler.
S |
|
#4
|
||||
|
||||
|
RE: Trees vs. Tables
There's no advantage to building complicated data structures in a scripting language. Tables are the only reasonable way to do this in PHP.
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Programming Theory > Trees vs. Tables |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|