Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
There are two methods to implement forum or message board: file or database. Relatively speaking, the use of databases should be simpler and more efficient, so as to better control the forum and provide some data verification and protection.
The ACCESS database is used here. For small and medium-sized applications, ACCESS should be competent.
From the above analysis, we can see that there should be four tables. Below I will show the structure of each table.
Author table (storing author information ):
ID: text type, required. It is a netizen code.
Password: text type, required.
Nickname: text type, required.
EMAIL: text type, required.
Title: number type, required. -1 stands for normal netizens and 0 stands for webmasters. A number greater than 0 represents bamboo, and the number is the ID of a board in the corresponding Kanban table, indicating the bamboo of that board.
Number of articles: number type, required. Total number of articles published by netizens.
Name: text type. Optional.
Gender: text type. Optional.
Phone: text type. Optional.
Content table (stores the content and related information of specific articles ):
ID: automatically numbered and indexed to speed up search.
Panel ID: number type, from the panel list, indicating the panel to which the article belongs.
Topic ID: number type, from the topic table, indicating the topic of the article.
Author ID: text type, from the author table, indicating the author of the article.
Date: Date/Time type. The preset initial value is the function NOW (). When the system adds this field, the system automatically sets the current time to its value.
Title: text type. The title of the article.
Published: Yes/No. If it is "true", the article has been reviewed and can be published. If it is "no", the article has yet to be reviewed.
Recommendation level: number type, article recommendation level.
Content: Remark type, specific content of the article.
Number of clicks: number type, number of clicks on an article.
Dashboard List (stores information about Dashboard ):
ID: automatic ID. Similarly, an index is also set for it.
Name: text type, card name.
Banner: text type, the ID of the banner.
Number of topics: number type, the number of topics contained in the dashboard.
Topic table (stores information about topics ):
ID: automatically numbered and indexed.
Title: text type, indicating the topic name.
Panel: number type, from the panel list, indicating the panel to which the topic belongs.
Number of articles: number type, number of articles included in the topic.
All the tables are designed, but the database design is not complete. We also need to establish a relationship between tables so that the database can perform correlation checks to avoid data errors. Another benefit of establishing the relationship between tables is that it can easily create complex JOIN queries.
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to firstname.lastname@example.org. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
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:
and provide relevant evidence. A staff member will contact you within 5 working days.