ASP technology is used in forums. (2) (the complete forum creation procedure is recommended for vomiting blood !!!!)

Source: Internet
Author: User
Tags current time access database
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.
Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.