After the preparations above were completed, it should be said that one-third of the Long March had been completed. Because of the clear program flow, basic and sufficient programming resources, and possible difficulties, we have found solutions. It can be said that "everything is ready, but we only need the east wind"! Because we have prepared in advance, even if we may encounter some difficulties in the future when writing the program, it will not become a "stumbling block". All we need to do is to take out a lot of time, calm down and follow it carefully Programs and processes are written. Here we explain that before writing a program, you should first establish a blank database. Of course, you can also establish a database when designing the plan, or you can also establish a blank database before officially writing the program after completing the previous five steps.
Some suggestions for writing database programs
Since the database program has many interactive functions and the user has a large amount of data that users need to input, the program's error handling must be fully considered, and the user may have input errors should be fully considered and promptly given in the program.
Verify the input data during saving to prevent some illegal data from being saved in the database, resulting in errors in subsequent statistics and queries.
It is not easy to write a program with good stability and strong fault tolerance. From experience, a large part of the energy is spent on preventing errors and allowing the program to run stably.
After completing the code of a functional module, you must debug it immediately. After the debugging is passed, write the code for another function. This can prevent the code from being debugged after the code is finished. Because of the possible mutual influence, it is impossible to clear which part of the code. There is a problem.
You need to add some comments to the key parts of the code in case you can't understand how you wrote it in the future. Back up the program code and prepare for "disaster recovery".