Server operating database used by the SQL statements can be stored in what position, as far as I know now there are three methods: 1, the program built-in, 2, and saved to the database, 3, save the configuration file,
I slightly understand the merits of the three methods, listed as follows:
Program built-in:
Advantages: simple,
Disadvantages: not convenient maintenance, every change need to be changed, compiler,
Saved to the database:
Advantage: safety,
Disadvantages: (temporarily not clear, may be need database designer or have access to do it?)
Save the configuration file:
Advantages: easy configuration, don't tube program change,
Disadvantages: unsafe, such as the query to delete statements is easy,
I know only these temporarily, welcome to have a big complement,
CodePudding user response:
Is usually the first to implement,Second, in fact is to write a stored procedure, the performance is better, but poor portability,
Three write configuration files is restricted, even if you don't have security issues, programming is relatively difficult, how the incoming variables? So save most is SQL templates,