The table structure and initial data of each datasheet in the sample database are presented in this article, and a table in the database will be used in future cases involving the operation of the datasheet. For database, table creation and use of knowledge, see:VFP Basic Tutorial 2nd "database, table and index" knowledge, no longer detailed here, only give the structure of each data table and initial data. The download address for the sample database source file is shown at the end of this article.
The sample database is named "Data 1", include the site information table, additional information table, Staff information table, payroll, and manage five datasheets, and if you are creating a database using the project Manager, expand the following figure in the project manager:
First, "Website Information table":
Table structure see the following table:
Field name |
Type |
Width |
Number |
Character type |
5 |
Site name |
Character type |
12 |
Website Web site |
Character type |
24 |
In the Table Designer, index the Number field of the Site information table, as shown in the following figure:
The Site information table has a "number" for the wz001 of an initial data, see the table below, please add:
Number |
Site name |
Website Web site |
wz001 |
Getting Started with programming web |
http://www.bianceng.cn |
Second, "Additional Information table": The table can and "Website Information table" merged into a table, only in the future, the example needs to demonstrate the table operation and tables join operation, so the separate establishment of this table.
The table structure of the additional information table is shown in the following table:
Field name |
Type |
Width |
Site number |
Character type |
5 |
Site Type |
Character type |
16 |
Website description |
Character type |
60 |
In the Table Designer, create an index for the site number field of the additional information table, as shown in the following figure:
"Additional Information table" has "site number" for the wz001 of an initial data, see the table below, please add:
Site number |
Site Type |
Website description |
wz001 |
Technology site |
A variety of programming documents, computer tutorials and software application tips, your computer technology gas station! |
Third, "Personnel information table":
Table structure see the following table:
Field name |
Type |
Width |
Number |
Character type |
5 |
Name |
Character type |
8 |
Department |
Character type |
10 |
Gender |
Character type |
2 |
Degree |
Character type |
8 |
Wage |
Currency type |
8 |
Home Address |
Character type |
20 |
Date of birth |
Date type |
8 |
In the Table Designer, create an index for the number field in the People information table, as shown in the following figure:
"Personnel information table" has "number" for the ry001~ry005 five initial data, see the table below, please add:
Number |
Name |
Department |
Gender |
Degree |
Wage |
Home Address |
Date of birth |
ry001 |
Tom |
Personnel |
Man |
University degree |
1000 |
Beijing |
01/01/1970 |
ry002 |
John doe |
Personnel |
Woman |
University degree |
1000 |
Beijing |
01/10/1980 |
ry003 |
Wang |
Planning Department |
Man |
University Specialist |
800 |
Nanjing city |
01/10/1979 |
ry004 |
Leper |
Planning Department |
Woman |
University Specialist |
800 |
Shanghai City |
06/05/1982 |
ry005 |
Naughty |
Personnel |
Man |
Master |
1100 |
Beijing |
05/21/1976 |
Four, "salary scale":
Table structure see the following table:
Field name |
Type |
Width |
Employee number |
Character type |
5 |
Bonus |
Currency type |
8 |
Medical Insurance |
Currency type |
8 |
Endowment Insurance |
Currency type |
8 |
Accident Insurance |
Currency type |
8 |
Housing subsidy |
Currency type |
8 |
Living Allowance |
Currency type |
8 |
In the Table Designer, create an index for the employee Number field in the Payroll table, as shown in the following figure:
"Payroll" has "employee number" for the ry001~ry005 five initial data, see the table below, please add:
Employee number |
Bonus |
Medical Insurance |
Endowment Insurance |
Accident Insurance |
Housing subsidy |
Living Allowance |
ry001 |
36 |
65 |
98 |
45 |
59 |
69 |
ry002 |
95 |
84 |
25 |
85 |
63 |
84 |
ry003 |
96 |
55 |
96 |
74 |
25 |
85 |
ry004 |
42 |
85 |
41 |
36 |
58 |
42 |
ry005 |
41 |
64 |
86 |
41 |
76 |
59 |
V. Management table: This table is used to store the system administrator's account number and password in the following example of system login verification:
Table structure see the following table:
Field name |
Type |
Width |
Operator name |
Character type |
10 |
Password |
Character type |
8 |
"Management" has two initial data of "operator name" as "John" and "Dick", see table below:
Operator name |
Password |
Tom |
12345678 |
John doe |
Aaaaaaaa |
Resources:
The basic course of VFP: http://bianceng.cnhttp://www.bianceng.cn/vfpjc/index0.htm
VFP Primary Course: http://bianceng.cnhttp://www.bianceng.cn/cc/index.htm
VFP Intermediate Course: http://bianceng.cnhttp://www.bianceng.cn/mcc/mcc.htm
VFP Advanced Course: http://bianceng.cnhttp://www.bianceng.cn/hcc/hcc.htm
VFP Network Development: http://bianceng.cnhttp://www.bianceng.cn/VFPwz/vfpwlkf.htm
VFP Call API function: http://bianceng.cnhttp://www.bianceng.cn/VFPwz/vfpapi.htm
VFP Report Print: http://bianceng.cnhttp://www.bianceng.cn/VFPwz/vfpreport.htm
VFP Common technique: http://bianceng.cnhttp://www.bianceng.cn/VFPwz/vfpcyjs.htm
VFP Experience Summary: http://bianceng.cnhttp://www.bianceng.cn/VFPwz/vfpjyhz.htm
VFP Control use: http://bianceng.cnhttp://www.bianceng.cn/VFPwz/vfpkjsy.htm
VFP Data processing: http://bianceng.cnhttp://www.bianceng.cn/VFPwz/vfpsjcl.htm
The sample database for this article is built under VFP6.0.
See the full set of "rookie also learn VFP" tutorial