1. analysis when we use php to create a website, classification is very important. The second classification is called subclassification under the classification. Currently, most websites are classified only into the third category: the first category (parent category)-The second category (sub-category)-The more kinship categories the third category (Sun category), the more complex and difficult it is to control programs and databases. classification processing and control at the same level 1. analysis
When we use php to create a website, classification is very important. The second classification is called subclassification under the classification. Currently, most websites are classified only into the third category:
First category (parent category) --> second category (sub-category) --> third category (Sun category)
The more kinship classification, the more complex and difficult it is to control programs and databases. classification processing and control at the same level is very simple, because only one database is required to record the classification at this level, such as system and news, processing at this level is very simple, but for a website, level-1 classification is not enough, and further classification is required, such:
System --> linux, windows
News-> linux News, windows News
In this way, the classification is clearer, at least understandable. The system includes linux and windows, and the news includes linux news and windows news. in order to make the information clearer, the classification should continue:
Linux --> System Tools, kernels, programming languages, and development tools
...
When classification reaches Level 3, information and materials are processed more clearly. that is to say, the more detailed the classification is, the more convenient it is, this facilitates information processing and allows users to clearly find the required information. However, with the continuous refinement of classification, it becomes increasingly difficult to control programs and databases.
Difficulty 1: how to deal with these interrelated kinship classifications in the database?
Difficulty 2: how to use php to achieve this clear relationship?
This multi-classification and fine-grained classification is a problem that every php programmer must solve. it is inevitable to create a good and outstanding website classification problem, the solution to this problem is quite complicated. The biggest problem is the classification of the database. if the database is improperly processed, it will bring about a huge workload or even have to re-plan the database...
This is not an exaggeration, because many people will use the first-level classification to create a database in database processing. at that time, I also used this method to process classification, because most websites are classified to the third-level, therefore, the database only needs three classification databases for processing. however, when downward classification is required, the disadvantages of this approach are revealed, because the more you divide, the more workload, the larger the program volume ..
The method I want to introduce is how to use a classification database to create an infinitely downward classification method. readers who have used windows know that windows folders can create an infinitely hierarchical directory, you can continue to create a directory under the Directory, so that you can continue to split it. This function is also available in Linux directory creation. the method I introduced is the same as this method.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service