英语学习助手设计报告_第1页
英语学习助手设计报告_第2页
英语学习助手设计报告_第3页
英语学习助手设计报告_第4页
英语学习助手设计报告_第5页
已阅读5页,还剩16页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Error! No text of specified style in document.数据库课程设计报告 设计题目: 英语学习助手系统 指导教师: 卢照 专 业: 网络工程 班 级: 1404 学生姓名: 刘泽(2014100409) 王 慧(2014100406) 段慧强(2014100457) 赵 儒 (2014100405) 徐世豪 (201410032) 目录需求分析3DFD数据流图3功能设计:4功能分析:4SC结构图5数据库设计:5ER图5数据字典5数据库逻辑设计8数据库物理实现10系统实现12软件环境:12硬件环境13关键代码13界面实现17课程设计分工:20结束语:20需求分析随着社会的高速发展,社会对我们日常的要求也是越来越高,比如说掌握一门外语,外语的学习中,其中英语是不可或缺的,对英语的学习及其重要,因此,我们针对这一社会现状,特别开发了一个小巧的英语在线学习助手,由于我们是一个web程序,所以用户只需要有浏览器,可以接上网络 ,那么就可以很方便的使用我们的的学习助手。DFD数据流图顶层DFD一层DFD功能设计:功能分析:1) 实现英语单词的录入、修改、删除等基本操作。 2) 实现常用英语单词例句的录入、修改、删除等基本操作。 3) 实现英语单词检索、翻译等。 4) 常用英语单词例句检索。 5) 能够检索出短文极其翻译对照表。 6) 具有数据备份和数据恢复功能。SC结构图数据库设计:ER图数据字典User表 用于用户的登陆数据项id唯一标识登陆名登陆密码昵称角色idRole表 角色分类数据项id唯一标识角色名称Menu表 系统的功能数据项id唯一标识功能名称功能路径功能pidmenu_role表 角色对应的功能数据项id唯一标识角色id功能idWord表 词汇的存储数据项id唯一标识英文中文词汇级别example_sentence表 短语的存储数据项id唯一标识关键字例句翻译Essay表 短文的存储数据项id唯一标识英文中文数据库逻辑设计User中文说明字段类型说明id唯一标识UserIDint(8) NOT NULL登陆名loginNamevarchar(32) NULL登陆密码LoginPasswordvarchar(32) NULL昵称RealNamevarchar(32) NULL角色idfkRoleIdint(8) NULLRole中文说明字段类型说明id唯一标识RoleIDint(8) NOT NULL角色名称RoleNamevarchar(32) NULLMenu中文说明字段类型说明id唯一标识MenuIDint(8) NOT NULL功能名称MenuNamevarchar(32) NULL功能路径MenuURLvarchar(128) NULL功能pidMenuPidint(8) NULLmenu_role中文说明字段类型说明id唯一标识MenuRoleIDint(8) NOT NULL角色idRoleIDint(8) NULL功能idMenuIDint(8) NULLWord中文说明字段类型说明id唯一标识wordIDint(8) NOT NULL英文englishWordvarchar(16) NULL中文chineseWordvarchar(16) NULL词汇级别levervarchar(16) NULLexample_sentence中文说明字段类型说明id唯一标识esIDint(8) NOT NULL关键字keyWordvarchar(32) NULL例句examplevarchar(255) NULL翻译example_chinesevarchar(255) NULLEssay中文说明字段类型说明id唯一标识essayIDint(8) NOT NULL英文essayvarchar(600) NULL中文essay_chinesevarchar(600) NULL数据库物理实现Essay 表 用于学习助手的短文数据存储example_sentence 表 用于学习助手的短语数据存储Word表 用于学习助手的词汇数据存储 Users 表 用于记录学习助手的用户信息Role 表 存储学习助手的角色menu_role 表 用来储存角色对应的关系Menu表 标明学习助手的拥有的功能系统实现软件环境:Web服务器: tomcat 8.0数据库:mysql 5.6开发工具:eclipse设计语言:java硬件环境操作系统:window8.1Cpu: inter i5内存: 8g硬盘: 500g关键代码词汇处理部分WebServlet(/WordSer.do)public class WordSer extends HttpServlet private WordDaoImpl daoImpl=null;private Logger logger = Logger.getLogger(WordSer.class.getName();public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException doPost(request, response);public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException String type = RequestUtils.getRequestField(request, type,);System.out.println(type);if (type.equals() showWords(request, response);System.out.println(请求了用户列表);return;if (type.equals(addWord) addWords(request, response);System.out.println(插入用户);return;if (type.equals(findByKey) findWordsByKey(request, response);System.out.println(根据key查询词汇);return;if (type.equals(updateWord) System.out.println(修改词汇);updateWords(request, response);return;if (type.equals(delWord) System.out.println(删除词汇);delWords(request, response);return;private void delWords(HttpServletRequest request,HttpServletResponse response) / TODO Auto-generated method stubString wordIDs = request.getParameterValues(wordID);System.out.println(wordIDs的长度-+wordIDs.length);Map map = new HashMap();if (wordIDs.length!=0) daoImpl.delWords(wordIDs);else map.put(stat, FAIL!);map.put(msg, 删除用户失败!);JsonUtils.jsonOutPrint(response, JsonUtils.getJson(map) ;return;map.put(stat, OK!);map.put(msg, 删除用户成功!);JsonUtils.jsonOutPrint(response, JsonUtils.getJson(map) ;private void updateWords(HttpServletRequest request,HttpServletResponse response) / TODO Auto-generated method stubWord word = new Word();Map map = new HashMap();try BeanUtils.copyProperties(word, request.getParameterMap();System.out.println(word.getEnglishWord()+word.getChineseWord()+word.getLever();daoImpl.updateWord(word);map.put(stat, OK!);map.put(msg, 修改用户成功!); catch (IllegalAccessException e) / TODO Auto-generated catch blockmap.put(stat, FAIL!);map.put(msg, 修改用户失败!);e.printStackTrace(); catch (InvocationTargetException e) / TODO Auto-generated catch blockmap.put(stat, FAIL!);map.put(msg, 修改用户失败!);e.printStackTrace();JsonUtils.jsonOutPrint(response, JsonUtils.getJson(map) ;private void findWordsByKey(HttpServletRequest request,HttpServletResponse response) / TODO Auto-generated method stubString traType = eng;String tra = request.getParameter(tra);Word word = null;if (tra.equals(chi) String englishWord = request.getParameter(key);System.out.println(英文-+englishWord);daoImpl= new WordDaoImpl();word =daoImpl.getWordBykey(englishWord, traType);if (tra.equals(eng) String chineseWord = request.getParameter(key);System.out.println(汉文-+chineseWord);traType = chi;daoImpl= new WordDaoImpl();word =daoImpl.getWordBykey(chineseWord, traType);if (word != null) JsonUtils.jsonOutPrint(response, JsonUtils.getJson(word);System.out.println(中英互译完成);private void showWords(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException List list= null;daoImpl= new WordDaoImpl();Page page = new Page();page.setPagesize(Integer.parseInt(request.getParameter(rows);page.setPage(Integer.parseInt(request.getParameter(page);/page.setRows(daoImpl.getTotal();log(page页码:-+page.getPage();list = daoImpl.showWord(page);int total = daoImpl.getTotal();String json =total:+total+,rows:+ JsonUtils.getJson(list)+;System.out.println(json);JsonUtils.jsonOutPrint(response, json);private void addWords(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException daoImpl= new WordDaoImpl();Word word = new Word();Map map = new HashMap()

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论