基于COM的多层数据库——试题管理系统 摘 要 此软件为基于COM的多层数据库系统。由于DCOM有着执行性能优越、负载平衡、 安全性、协议无关性、 容错性、组件和复用、可扩展性、健壮的版本发展、位置独立性、 语言无关性等众多的优点,而且利用DCOM可以形成廋客户端,客户端只需有一个客户端应用程序和一个midas.dll即可运行,将这两个程序拷贝到一张软盘即可。不需另行制作安装程序。 此软件是利用Borland公司的Delphi 6.0开发完成的,其中第一层是数据库服务器,包括一些必要的数据表,其后台数据库为Borland公司的Paradox,利用BDE与Data Access 控件相连接;第二层是应用程序服务器,包括DCOM组件和一些对数据库操作的接口和函数;第三层是应用客户程序,对数据进行显示和一些必要的处理。 此软件功能主要包括出题,人员管理,考试,查看成绩等部分组成,其中,人员管理主要包括管理员和学生。出题部分分为对题库进行增、删、改等操作和出考试试卷两部分。在操作范围里,出题部分、人员管理只有管理员可以操作,而学生只可以进行考试和查看成绩。 关键字:COM、MIDAS、BDE、Data Access According to COM of the multi-layer database ————The system of the examination manages Abstract This software is a system of the multi-layer databases to base on COM. Because the DCOM have got to carry out the function superior, load equilibrium, safety, protocol irrelevant, permit the mistake, module to use with many times , expandible , haleness of the edition develop, position independent, the irrelevant of language and so on, the numerous advantage, and that make use of the DCOM can become the thin customer to carry, and the customer carry to only need to have a customer application to carry out and only need to have a midas.dll, and copy a soft disk these two applications.Don't need to create the install application. This software is which make use of the Delphi 6.0 of Borland company developed , among them the first floor is a database server application, and include some necessity of data tables, the database is for the Borland company Paradox, make use of the BDE and Data Access control to connect with each other connect; The second floor is an application server, and include the DCOM module and some interface and function to what databases operates; The third layer is an customer's application, which show and some necessity handle to data. The function of this software primarily include to make out questions, personnal management, examine, and look into the score etc. The part constitute, among them, personnel management primarily include to manage the person with manager and student. the part constitute of Makeing out questions include to add, delete, change the database , the operation with try winding out the examination . Within the scope of operation, make out questions the part, personnel management have only manager operate, but student can only proceed examination and look into the score. Keyword: COM、MIDAS、BDE、Data Access 目 录 一、前言 5 二、DCOM概述 6 (一)、为什么要做分布式应用 6 (二)、DCOM的结构 7 (三)、DCOM的优点: 8 1、组件和复用 8 2、位置独立性 8 3、语言无关性 10 4、可扩展性 10 5、灵活的配置 10 6、健壮的版本发展 12 7、执行性能 14 8、安全性 14 9、负载平衡 15 10、容错性 16 11、协议无关性 16 12、平台无关性 16 13、Internet上的DCOM 17 三、多层数据库应用程序设计简单原理 18 (一)多层数据库的概述 18 (二)Delphi 6.0三层数据库应用程序结构 18 1、客户端多层数据库控件 18 2、服务器端多层数据库控件 19 3、消息传递过程 19 4、更新数据的运作原理 20 四、试题管理系统 25 (一)功能层次图 25 (二)第一层:数据库 26 1、基本表结构 26 2、数据表关系图: 27 (三)中间层:服务端应用程序 28 (四)第三层:客户端应用程序 30 五、致谢 37 六、参考文献 38 七、附录 39 一、前言 MIDAS已经是现时流行的编程方式了。MIDAS是Delphi是用来开发多层应用系统使用的中介透明引擎。通过MIDAS,程序员可以使用相同的组件存取不同的后端应用程序服务器。这些后端的应用程序服务器可以是COM/DCOM应用程序服务器,MTS中介软件,或是CORBA应用程序服务器。此外MIDAS也提供了容错能力,负载平衡以及高执行效率等的能力。 开发分布式多层应用系统在现在似乎是所有开发工具,数据库厂商,internet/intranet工具,以及操作系统厂商都大力鼓吹的应用系统结构。为什么分布式多层应用系统成为目前最流行、最重要的结构是有很多原因的。 虽然每一家软件厂商提倡的分布式多层应用系统结构都不太一样,但是目前最广为流行以及被大家所接受的分布式结构大致上可以分为以两种不同分布式技术为骨架的系统结构。这两种不同的分布式技术分别是由Microsoft制定的COM/DCOM/COM+以及其他众多厂商,包括sun,IBM,Inprise,Netscape等提倡的以CORBA为核心的分布式结构,本文所讨论的就是基于COM的MIDAS技术。 本文主要研究以下几方面的内容: 1 DCOM的概述。 其中包括:为什么要做分布式应用、DCOM的结构、DCOM的优点等等。 2 多层数据库的简单原理。 主要讲述了建立多层数据库的基本原理和框架,包括多层数据库的概述,多层数据库的结构、传递原理、数据更新的操作原理等。 3 应用程序的功能介绍 介绍了试题管理系统的建设,由于源代码过多,所以并没有附在本文中。此部分包括了数据库中的表结构,应用程序的功能层次图、客户端应用程序结功能介绍。 |