Tutorials to .com

Tutorials to .com » Software » Vfp » In a networked environment using Foxpro database management software developed under the Experience

In a networked environment using Foxpro database management software developed under the Experience

Print View , by: iSee ,Total views: 31 ,Word Count: 1978 ,Date: Sat, 18 Apr 2009 Time: 5:07 PM

Abstract In this paper, I use foxpro development environment in the network database management software, for data sharing and exclusive, improve system security and performance experiences are summarized. Key words FoxPro database management software with the development of computer technology, especially network technology and database technology, the maturing of information management systems have become the realization of scientific research, production, operation and management activities of the key to efficient operation. Although there are ORACLE, SYBASE, etc. good database management system can be used as development platform, but in a small network environment, the development of small scale in terms of database management software, consider its cost-effective, FoxPro is a suitable choice. The authors make use of the network environment FoxPro database management software development experience are summarized below for reference.

1, multi-user environment to share documents and the realization of monopoly

(1), when you want to access documents or records do not want to let other users access to the time (typically update the database), can be a real visit to their "locked", immediately after the end of the visit, "Solution lock "; or exclusive way to open the database file for a visit. I added this to the data storage as an example, using the button on the form of the realization of "locking" - "unlock" method. The advantages of this method: When the lock failed, the program can automatically return to the data edit screen (no need for programming intervention), so the user can be, and then click a timely manner, "additional" button to continue its work. "Additional storage" button the following code fragment: ... set exclusive off use (locfile ( "z: \ message \ scxx \ hytz", "dbF", "Where is hytz.dbf ?")); AGAIN ALIAS hytz ; ORDER 0 set reprocess to 0 ok = flock () & & lock if ok & & successful lock append from hytzi wait "data additional success! Press any key to continue!" window
unlock & & unlock failed else & & lock wait "document has been the use of other users, please try again later!" window endif use set exclusive on ... of which: hytz.dbf - the target server database table hytzi.dbf - temporary database tables

(2), when you want to access documents or records to allow other users to visit (usually a database search operation), to share ways you can open the database file.
Hytz.dbf as an example to retrieve data. Hytz to open the data query screen in the Layout of SCREEN, the point from Code button, the Screen Setup Code to add the following code segment: ... SELECT 0 USE (LOCFILE ( "hytz", "DBF", "Where is hytz ?")); AGAIN ALIAS hytz; shared; & & share the way to open ORDER 0 ... recommended system updates and data retrieval is divided into two sub-system design and coding, so easy in the proceedings of the value of EXCLUSIVE settings (the use of SET EXCLUSIVE Command and USE (EXCLUSIVE | SHARE) command). In order to reduce the database access to the "collision", may from time to time (such as at night) to update the database operations (this may be the system administrator to complete).

2, to reduce the volume of data transmission network to improve the efficiency of data sharing

(1), will FOXPRO software, applications, and some do not have to share the data stored in the network of workstations on the local hard disk, only the need to share the database stored in a shared network server directory.

(2), for use in online database management system database in order to reduce the monopoly of the time, recommended the establishment of the local machine and its structure is identical to the method of the temporary library. Data in the temporary library editor, and edit to be completed and verification of data accuracy, the goal of catching added to the database server; data query, the first to meet the conditions to extract data from the server to the temporary library, and then the results into the desired action.

3, the security measures in the database system, due to large concentrations of stored data for direct multi-user sharing, so that more prominent security issue.

(1), in order to protect the database in order to prevent unlawful use, for those who have been on the right machine users, but also further in accordance with its database to carry out the necessary permissions to carry out the operation of classification, to ensure their competence only to the corresponding data access, and not ultra vires.

(2), to share data stored in the server's shared directory, the software at the same time the query (the query system, only users with a query to enter) as a stand-alone systems installed on the workstation, and data editing software (the data only with data editing system to edit permissions of the user to enter) the data source installed on the workstations point. The user's permission by the network operating system and the system administrator.

4, take full advantage of Rushmore technology to enhance the database to operate under the network environment Rushmore Technology is a high-speed access to data on the efficiency of data access technology index. Search procedures in the preparation of the database, the application of the technology and efficient access to a combination of a number of records to complex database operations hundreds of times faster. Rushmore can use the command as follows:
-------------------------------------------------- ---- AVERAGE COPY TO ARRAY
EDIT LIST SCAN ----------------------------------------------- ------- However, programmers must keep in mind the conditions for the use of the technology:

(1), use the command shown in the table must contain a FOR parameters, parameters and conditions FOR expression must be an expression optimization. Moreover, the scope of the search may be to give the command AVERAGE, SUM, LOACTE, SORT and so on and so on with ALL or NEXT. In addition, the order parameter can not be WHEN.

(2), can only handle a single database, in order to use Rushmore technology to deal with multiple databases at the same time, you must use the SQL the select command, because the order will Rushmore query optimization technology as the basis of technology, when the SQL that needs index, automatically create a temporary index file.

(3), in the order shown in the table if the specified parameters NOOPTIMIZE will not use Rushmore technology.

(4), in Standard Edition FOXPRO, when the total number of database records over 500,000 hours, Rushmore invalid.

5, data redundancy in order to improve the efficiency of the implementation of applications in the storage space under the conditions allowed by the careful consideration, you can choose to retain some data redundancy can also be retained in the database using a particularly high frequency, the results of calculation of time-consuming.

6, other

(1), in order to avoid duplication of work programmed to reduce the usage of hard disk space, the design process in the system to conduct a comprehensive analysis, extraction of similarities, the preparation of common procedures, procedures to facilitate reuse.

(2), the requirements of the interface in order to improve the environment across the network system of human-computer interaction and interoperability, user interface should have the reliability, simplicity and immediate feedback characteristics. . Reliability: refers to the interface to have a certain tolerance, the right to give timely instructions to run the state and error information, and guide the user to correct the error;. Simple: to minimize the burden of its customers, that is, the operation is simple, easy to remember, input / output easy to understand; immediate feedback: the user should request the application of psychology in the user license given time frame to respond, even if they can not get the results, but also some kind of information should be given to ease the user to wait for the psychological. I used the above method, has successfully completed a number of network environment an integrated information management system under development, has received very good results.

Visual FoxPro Tutorial Articles

Can't Find What You're Looking For?

Rating: Not yet rated


No comments posted.