ThispaperappliestherelevantprinciplesandmethodsofSQLdatabaseandExpertSystem,tryingtoresearchthemethodsandtechniquesofcombiningthemanddesignatemplateofproductionexpertsystemthatisbasedonSQLdatabaseanddrivedbythedatabasesoastosimplifythestructureoftheknowledgebasecarriedbydatabase,generatingthesystemmoreconvenientlyandoperatingitmoreeffectively.