system function design and database design
1. system function design and database design
1.1 System Function Design
Network online voting system to achieve a simple function, as follows:
The management of the voting project;
Add a voting item;
Deletion of voting items;
(a) vote on the project;
View the voting status of the item.
1.2 Database Design
The database design of this system is relatively simple, only need to store voting information. Create a database in SQL Server 2000 with the name "Webvotedb" and create a polling table votes in the database. Where the Voteid field stores the voting item ID, the item field stores the name of the voting item, and the Votecount field stores the number of votes per item. Create a voting item table the votes of the action interface is shown in Figure 1.
Voting items table votes needs to store the name of the voting item and its number of votes, and the table's field descriptions are shown in table 1.
Figure 1 Creating a voting item table votes's operating interface
Table 1 votes table
Field name
|
Data type
|
Field description
|
Key reference
|
Notes
|
Treeid |
Int |
Vote Item ID |
Pk |
Primary KEY (auto add one) |
Item |
VARCHAR (200) |
The name of the voting item
|
|
|
Votecount
|
Int
|
Number of votes
|
|
|
The online voting function is one of the most common functions of web application, and it is also a common functional module for Web application development. When an administrator or user of a Web site brings up new ideas and suggestions or a new product, they may need to determine whether the new ideas, suggestions, or new products meet the needs of the user or customer through a user or customer vote, and The website also can do some actual investigation work through the website online voting function. The online polling system introduced in this chapter also displays voting information in an intuitive graphical interface, and can also be viewed in a timely manner.