The invention provides a method for operating a
database. The method comprises the following steps of receiving a service
processing request; and then obtaining a first
XML configuration file and a second
XML configuration file corresponding to the service
processing request, and extracting a target parameter from the service
processing request by using the first
XML configuration file, reading and executing a
database operation statement in the second XML configuration file to obtain a
database operation result, assembling the database operation result into a processing result return messageaccording to the first XML configuration file, and returning the processing result return message. Compared with an existing mode of performing database operation by using a
JAVA file, and according to the method and the device, the
JAVA file is not used, the database operation statement is recorded in the second XML configuration file, and due to the fact that the execution efficiency of the second XML configuration file is superior to that of the
JAVA file, the execution efficiency of the method and the device is higher than that of an existing database
operation mode.