To improve the security of the web information system database,designed a database database encryption model. The model used the middleware technique, put the encrypted system into the middle layer, introduced the Encryption/decryption module and security certificate module to secure the safety of the database. To prevent the dictionary attack, the user login and authentication module used the salt technique. The opensource jQuery plugin encrypted the form data, the sensitive data was encrypted and decrypted by the encryption middleware, the the module was made up of three module:encryption engine module, keys generate, keys management module and the database connection module. The encryption algorithm of the encryption middleware mainly used the AES and RSA encryption algorithm, AES used to encrypt data and RSA used to encrypt the keys. the module was used in the yulin college salary query information, and it shows that the module can improve the security of web information system effectively.