Hi,
I was assigned to develop a site which is basically comprised of numerous articles. Each articles is very long and has multi-sections, and each subsection has its own subsection... so we decided to split each articles into small parts to accomdate easy reading and maintenence.
So some of the subsections will have title and body, and some of them will only have a title followed by its subsections. The tree-mode can represent the structure of each article very well:
*
/\ / \ * a *
/ \ / * a * *
* --- sections have subsections
a --- sections have only titles, but no contents
I tried using 2 tables, one for "*"s, the one for the "a"s. But I don't think it worked well. Because each subsection needs to find its parent, and it turned out to be looking for its parents in 2 tables, which I think is inefficient. But I didn't come up with any other solutions yet
Can somebody help? Does anyone have any similar experience with these kind of situation before?
Thank You
Here are the fields will be needed to build the tables:
* ArticleId
* ArticleTitle
* ArticleBody
* ArticleParentId
* ArticleOrderId
I was assigned to develop a site which is basically comprised of numerous articles. Each articles is very long and has multi-sections, and each subsection has its own subsection... so we decided to split each articles into small parts to accomdate easy reading and maintenence.
So some of the subsections will have title and body, and some of them will only have a title followed by its subsections. The tree-mode can represent the structure of each article very well:
*
/\ / \ * a *
/ \ / * a * *
* --- sections have subsections
a --- sections have only titles, but no contents
I tried using 2 tables, one for "*"s, the one for the "a"s. But I don't think it worked well. Because each subsection needs to find its parent, and it turned out to be looking for its parents in 2 tables, which I think is inefficient. But I didn't come up with any other solutions yet
Can somebody help? Does anyone have any similar experience with these kind of situation before?
Thank You
Here are the fields will be needed to build the tables:
* ArticleId
* ArticleTitle
* ArticleBody
* ArticleParentId
* ArticleOrderId