免费预览已结束,剩余5页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
计算机毕业论文中英文翻译计算机毕业设计专业 计算机毕业论文 信息管理系统毕业设计来源: 毕业论文发布者:计算机毕业论文 时间:2009-3-8 14:39:32 阅读:1518次数据库设计在VB 6.0 中应用 1摘要: 在你开始设计数据库之前,你需要理解数据库是什么和你必须从中选择的数据库的什么类型是十分重要的。 应用程序的类型将影响你选择的数据库类型。什么是数据库?数据库包含很多不同目标使用一同允许你应用快和有效率的参数的系统。 你能使你的应用在很多数据库中得到体现,最常用的用以下几种:Microsoft Access; Microsoft FoxPro; Oracle Personal Edition 7i or 8i; MS SQL Server 7.00 简单提一下 所有这些数据库能在一台独立计算机上运行并且允许你创造你的应用程序的复杂的数据库。挑选你的申请的正确的数据库极其重要, 错误一将影响性能并且使作为一更加难的开发者的工作。 在开始设计过程之前,你需要选择数据库。什么时候使用Visual Basic,你可以选择的数据库可以清晰的分为两组:本地数据库 直接经过Visual Basic的数据库引擎从Visual Basic访问; 但远程数据库 不能通过使用Visua Basic的标准数据库存取功能被访问。理解两者的区别将帮助你选择你的需要的正确的数据库。 但是, 用Visual Basic 6,现在有同时访问本地数据库和远程数据库使用相同数据库存取控件ActiveX Data Objects。掌握Universal Data Access(UDA)随着数据库存储方式的改变,数据库已经开始从本地计算机转移到网络数据库服务器上。 微软公司从发展策略考虑,允许任何公司或者数据库访问相同方法。这被叫为通用数据存取或者UDA。 理解UDA的意思没有理解如何使用它来的简单。这的原因是,那UDA是正创建被使用的一种数据库存取方法的任何公司的一套规章和存取方法。 这允许你,程序员,相同的方式访问任何数据库。但是UDA是什么?通用数据存取微软公司发展确定并且交付使用的适合未来的应用开发的标准的一个平台,应用和工具。使用UDA 标准将提供高性能进入给数据和保存在多平台的信息的很多类型, 以及将与几乎任何工具或者编程语言( 使用开发者已经有的技能)合作的一个编程接口。 这通过使用微软公司的数据存取组成部分(MDAC)被完成, 除了一套综合的技术,这包括ActiveX Data Comonents(ADO),OLE DB,和Open Database Connectivity(ODBC)。使用这些标准的好处如下:高性能数据的使用 -在不降低性能的前提下提供了任何应用或者组成部分支持现行的拥护连接的功能; 可靠性 - 降低了在PC上支持的部件; 以及广泛的工业支持 - 包括微软公司的很多供应商已经宣布对UDA 标准的支持了。在Visual Basic的以前的开发过程中, 你需要可供选择DAO(本地)存取数据的方法或者RDO(远程) 存取数据。现在,有支持UDA,Visual Basic数据存取有了第3 种方法称为ADO或者ActiveX Data Objects。 这允许你结合访问进一套编程的数据的不同路叫和目标。 ADO与OLE DB和ODBC一道工作提供进入你可能正操作的一数据库的途径。 预计,微软公司计划为有利于OLE DB和UDA 标准发展而逐步淘汰ODBC。但是, 对于不久的将来的DAO和RDO来说, 除了ODBC,仍然被支持允许开发者缓慢地适应数据存取的新标准。本地数据库一般来说,本地数据库比远程数据库要小的多,以下的数据库就属于这个范畴:Microsoft Access; Microsoft FoxPro; Lotus Worksheets; Microsoft Excel Worksheets; dBase; Paradox; and ASCII.你会发现,这些PC-resident型数据库类型已经存在了一段时间并且几乎可以从任何计算机软件商店获得。访问这些数据库不要求PC机安装任何其他软件被,它也不需要关于怎样操作这些数据库的专门知识。 不过,本地数据库的大小被限制。 Microsoft Access 97 数据库不能超过1GB(千兆字节)。本地数据库一般用于单个用户的应用例如支票本,通讯录,以及个人信息经理。 一些有事业心青少年已经创建帮助他们跟踪棒球卡片或者录像带的数据库应用。 因此在决定方面,你的应用方向是什么和将被怎么使用将帮助你在数据库选择过程中的决定。远程数据库定义说远程数据库不保存在用户的PC上,但是这并不完全正确。 实际上,应用程序在访问远程数据库要求一个ODBC(Open Database Connectivity)驱动来存取数据。 ODBC 数据库分成两个主要种类: 在一单个PC 上运行的和一个是一个巨大的模块,运行在性能强的具有巨大磁盘空间的计算机(服务器)。 数据库服务器被使用分开在客户PC机(这里指应用程序执行)和数据库系统(这里数据库被访问)。这为应用程序提供快的数据存取而没有减速用户PC。大部分大型数据库服务器提供将在独立PC机上运转的版本。 大多数大公司使用(虽然这是不说其它不可以) 的下列数据库系统一:Oracle; Sybase; and Microsoft SQL Server.使用远程数据库要求你使用Visual Basic 6可提供的远程数据库对象或者在Visual Basic 6的完全开放的新控件ActiveX Data Objects。 如果你正设计的应用程序将使用这些大的数据库,不过,在设计,发展和测试的过程期间,在设计过程中最好使用单机版的。然后,应用完成,改变ODBC 连接对更大,基于服务器版本。数据库设计在VB 6.0 中应用 2作者:Errol Booysens难度:初学者到中等开始初步设计 开发一个应用程序很像建造一幢房子,为一所建造得好的房子, 你需要一张蓝图跟随, 但是建立一张好蓝图,你需要知道谁将要住在房子和他们的生活方式怎么样。 这将帮助你决定卧室的数目和大小,使用什么颜色,等等。 对于一个应用程序来说,蓝图相当于技术说明;功能的说明是你需要知道创作技术规格说明的。 现在,很多书教总的应用程序的设计以使用非常非常简单的例子。我们必须鼓励的对应用程序的描述如下:个人地址/电话簿 这应用程序将用名字绑定名字,地址和电话号码。 它将满足很多不同的地址和电话号码的需求。此外,它将允许加入一些个人信息( 例如诞生日期,配偶名字和孩子名字)。它也将提供不同格式的报告并且允许用户搜寻适合一特别的人的数据库。选择任务阐明应用程序的任务同时也确定它的复杂性。 例如,这个应用程序是个地址/电话簿,你决如果定给用户选择一电话号码并且有计算机拨给他们的功能。为了给应用程序添加这功能模块,你需要知道怎样为调制解调器的存在测试,怎么样连接调制解调器,然后实际上拨那个号码。如果你不知道怎样增加这功能,在应用的最初版本被创作并且测试之后,再考虑等添加它。这是在开发新版本的时候要考虑的。应用程序最初的版本应该比较简单。设计一个应用程序最好的方法是对自己说:“如果我是用户我喜欢这个程序能帮我做什么?”前提是,你是这么程序最初也是最重要的用户。接下来不是做巨大的,需要合作开发的应用程序,而是那些较小的,个人的。在你决定你的程序将要提供哪些功能之前,你必须决定你的应用程序使用什么样的界面。对简单的应用程序,用浏览器风格的界面。回顾下这种界面,在用户印象中最初的形式和下图1显示的相似。上图这个界面中包括了很多我们早已经学过的控件。好,我们已经选择了你将要建立的应用程序,现在你要列出它将提供哪些功能,仔细考虑这个程序是为什么开发的和你该做什么,因为以上原因,你需要理解以下几条: 保存名字和地址 选择一个特殊的名字 打印不同的报表 允许不同的用户 可以简单的维护该程序 以上这些条例看起来很简单,接下来你扩展这些项目直到你自己满意为止。让我们在原来的任务上进一步扩张和增加一些详细的定义保持名字和地址一致当你说“ Keep names and addresses?”你是否明白其真正的意思,它通常表明你想要跟踪标准信息在你看的任何第一流的电话簿内找到。确定全部袖珍任务要求这个题目的第一步是列举你选举数据库想要的数据元素。 表格1 列举你能为这类应用使用的数据元素。Name Type First Name String Last Name String Spouse Name String Child Name String Address String City String State String ZIP Integer E-Mail Address String Phone Long Birth Date Date Notes String 表格一:这些数据元素包括在应用程序的数据库中,这个表格看起来很规整的,但是你在仔细考虑下,其中的字段像电话号码和生日,一个人可不可以拥有不止一个的电话号码呢?是的,如果你允许用户输入他的配偶和孩子的名字,就必须不止一个生日了。数据库中的表格一旦建立,你就必须考虑备份这些数据的功能,如何让用户看见这些信息?应用程序的部分要求以下形式:书面记录形式:详细如下展示。虽然数据的输入和显示直涉及到两个方面的,每一个操作只需要一点操作,第一个窗体可以使用户轻松的输入信息。你也可以根据你的喜欢,用Visual Basic的很多高级控件来建立一个表格。你也可以发现,窗体被一个TabStrip控件划分为商业和私人信息录入两块。现在,主要的要实现的功能使怎么把录入的信息显示出来,这个表格与大部分数据库的程序相似。验证输入的数据:根据输入的电话号码,来证实这个人是否已经在数据库中存在,当然也要允许用户取消操作,提供一个简单的方法来查询静态数据(如名字);然后确认用户的最后一次操作。在这些功能模块代码之间有一定的联系,然而,别的只是数据之间的联系。第二个窗体是给用户提供了一个可以显示所有用户录入信息而不需要改变模块来查看的方法。为了查看方便,你必须决定用什么方式来显示信息。有些软件把名字作为索引,使得用户信息不能被修改。现在的上课也是在这基础上做稍微的修改。这个版本的窗体需要以下可视的按钮:更新后一条前一条删除打印同时,也有些应用程序很好的结合了添加、显示、修改等功能于一个窗体,同时也增加更多的按钮来增加这些功能。特殊查找接下来该软件要实现的是对数据库中特定输入的查询的功能。但是在你使用浏览器风格的界面时,它好像不能根据一个人的名来查询。但是,你也许可以用别的方法来查找特定个体,包括以下的方法:姓氏代号配偶名字小孩名字所在城市国籍查询界面在大多数应用程序中是最基本的界面,所以你可以使用如何程序的设计观念,图3显示的是简单应用程序的搜索界面。注意那一组选择按钮允许用户根据特定的字段进行搜索,同时空白处允许用户输入合法的关键词进行搜索。这个界面提交了要查找的内容,接着使用数据库搜索引擎进行实际查找。图3不同的答应报表式样你想要从应用程序得到报告的什么类型? 这份报表在此过程中是否正确,报告通常与更大的软件相关,例如支票簿,账本等等。这应用程序将为用户提供一个在数据库输入的目录。但是这个目录采用什么格式呢?一些人将想要打印一个名字和编号存放在他们的公文包或者钱包。其它人将想要一详细打印整个数据库信息装订成本。真正的对这种列表进行复制的是后来的文章 Working with Crystal Reports. 。 但是你必须允许用户选择他们想要的输出格式。不同的应用软件中提供了不同的方法:一部分是弹出一个对话框让用户选择有用的报表内容,用户选择其中一个信息按按钮继续查找。还有一些应用软件提供给用户的是一个选择列表,用户选择所需要的数据项产生应用程序的标准报表。这种方法可以让用户自行设计一些不同的标准报表,那样用户就可以根据自己需要修改得到不同的版本。另一种方式是给报表添加查找能力。 报告精品选集想法的每类型完全依赖件报告的工具用来创造并且展示报告。考虑到不同用户很多数据库应用软件都支持复杂的数据库复制操作。这允许一个家庭中不止一个人使用应用程序,然而有他们自己私人地址/电话的数据库。 第一次访问数据库时你可以要求一口令来进入数据库。这类过程如图3中所示通常可以从主要应用菜单或者工具条中获得。当然,这种功能同时有它的问题和要求。其中最重要的是你要给这么软件提供一个空的数据库模板用做建立不同的数据库资料。软件的简单维护 维护对于用户来说到底意味着什么呢?他们唯一感兴趣的就是,在他们每次需要使用该软件时它是否可以工作。嗯,一个好的设计和测试关系到这个问题。但是如果某些事情在他们的计算机上出错怎么办还有他们丢失了数据库文件,还是他们不小心删除额文件? 如果这些不可想象的意外发生,你的软件必须允许用户创建数据库文件的备份的文件,他们可以简单的从他们的备份文件中恢复数据。涉及到复杂的数据库,数据库备份系统必须确认它的数据库已经备份。 图3确定限制确定一个应用程序的限制覆盖了两个不同区域的设计过程。 设计应用程序时,你或许将开发函数列表中的某一功能,你想要在应用程序内存在,但是不懂相关知识或者没有时间添加。这类发行真的取决于是否你正计划出售应用程序和什么时候做好进入市场的准备。开发者掉入的最大的陷阱之一是 one-more feature 综合症。 你在家完成一项工程,坐着并且说,那看起来很伟大,但是刚刚让我改变一件事情了吗? 如果你有,你已经了解这个致命的陷阱。如果你坚持改变 just one more thing 应用程序将永远完成不了。 为了防止这类问题的发生,确定适合你应用程序功能(函数和特征)的目录和继续坚持做到底。如果你发现某些功能在你的应用程序中将很好,把它列入下一个列表,等升级时在开发。以这种方法,你不会失去这个创意,它还将不影响应用程序的最初版本。你发现是一定在应用程序内,一点需要的功能,但是没有存在, 无论什么将延长其完成日期。你在开发应用程序确定的第2个限制是多少数据才太多,虽然你想要开发相当灵活的程序,为用户提供太多灵活性通常以误差的形式产生不良后果并且丢失数据为代价的。想象什么将发生什么如果你允许用户创造新电话号码什么时候增加新的字段。这能导致一个表单把数百个电话号码与它相关。用户将怎样容易展示这信息? 很多时间,这种限制出现在一个已经存在数据的数据库引擎的一个函数和它安全地支持能多少数据。就Microsoft Access 97而论,数据库文件不能超过1GB(千兆字节)。 像地址本这样的应用程序,这是个令人不愉快的数量啊。Designing a Database Application in VB 6.0 1By Errol BooysensDifficulty: Beginners to Intermediate Demo: None Summary Before you start to design a database, its important you understand exactly what a database is and what types of databases you have to choose from. The application type will affect the database type that you choose. What Is a Database?A database is really a system that contains many different objects used together to allow your application fast and efficient access to the data. You can use many examples of databases with your application. The most common of these are as follows: Microsoft Access; Microsoft FoxPro; Oracle Personal Edition 7i or 8i; and MS SQL Server 7.00 is only a few to mention. All these databases can run on a standalone computer and allow you to create very complex databases for your applications. Picking the right database for your application is extremely important, because the wrong one will affect performance and make your job as a developer so much more difficult. Before starting the design process, you need to select a database. When working with Visual Basic, the database that you can choose from fall into two distinct groups:Local Databases can be accessed directly from Visual Basic through Visual Basics database Jet engine; and Remote databases cannot be accessed by using Visual Basics standard database access capabilities. Understanding the differences will help you select the correct database for your application. However, in Visual Basic 6, there is now a way to access both local and remote databases using the same database access controls and objects known as the ActiveX Data Objects. Understanding Universal Data Access (UDA) As databases have grown and moved off the local computer and onto networked database servers, the methods employed to access the databases have changed. Microsoft has addressed these changes by developing strategy to allow for any company or database to be accessed the same way. This is called Universal Data Access, or UDA. Understanding what UDA means is not as simple as understanding to use it. The reason for this is that UDA is a set of rules and access methods that must be followed by any company that is creating a database access method to be used. This allows you, the programmer, to access any database the same way But what is UDA? Universal Data Access is a platform, applications and tools concept that Microsoft has developed that defines and delivers the standards for all future application development. Using UDA standards will provide high performance access to many types of data and information that reside on multiple platforms, and a programming interface that will work with almost any tool or language using the skills that developers already have. This is accomplished by using Microsofts Data Access Components (MDAC), as well as an integrated set of technologies, which include ActiveX Data Components (ADO), OLE DB, and Open Database Connectivity (ODBC). The benefits of using these standards include the following: High performance access to data Provides the ability to scale any application or component to support concurrently connected users without losing performance; Reliability Reduces the number of components to support on the client PC; and Wide industry support Many vendors including Microsoft have already announced support for the UDA standards. In previous releases of Visual Basic, you needed to choose from either DAO (local) access methods to data or RDO (remote) access to data. Now, with the support of UDA , Visual Basic has a third method for data access called ADO, or ActiveX Data Objects. This allows you to combine the different ways of accessing data into one set of programming calls and objects. ADO works in conjunction with OLE DB and ODBC to provide access to one database you might be working with. Getting forward, Microsoft plans to phase out ODBC in favour of OLE DB and the UDA standards. However, for the near future, DAO and RDO, as well as ODBC, will still be supported to allow developers to slowly move up to the new standards of data access. Local DatabasesLocal databases are generally much smaller than the remote type of database. The following databases fall into this category:Microsoft Access; Microsoft FoxPro; Lotus Worksheets; Microsoft Excel Worksheets; dBase; Paradox; and ASCII. As you can see, these PC-resident database types have been around for a while and are available from almost any computer software store. Accessing these databases doesnt require any other software to be installed on the PC, nor does it require special knowledge on how to work with them. However, the size of local databases is restricted. Microsoft Access 97 databases cant exceed 1GB (gigabyte). Local databases are generally used for single-user applications such as checkbooks, address books, and personal information managers. Some enterprising teenagers have created database applications that help them keep track of baseball cards or videotapes. So in deciding what your application will address and how it will be used actually helps you in the database selection process. Remote DatabasesBy definition remote databases dont reside on the users PC, but this is not always true. In fact, a remote database is any type of database that requires an ODBC (Open Database Connectivity) driver for an application to access it. ODBC databases fall into two main categories: one that run on a single PC and the larger corporate ones that require large, very powerful computers (called servers) with large amounts of available disk space. Database servers are used to separate the workload between the client PC (where the application executes) and the database system (where the database queries are performed). This provides the application with fast data access without slowing down the users PC. Most the large server-type databases provide versions that will run on standalone PCs. Most large corporations use one of the following database systems (though this is not to say that others arent out there): Oracle; Sybase; and Microsoft SQL Server. Using a remote database requires you to use either the remote database objects available only in the Enterprise version of Visual Basic 6 or the new ActiveX Data Objects available in all releases of Visual Basic 6. If youre designing an application that will use one of these large databases, however, the best way to create the application that will use the single-PC version during the design, development and testing process. Then, we when the application is completed, switch to ODBC connection to the larger, server-based version.Designing a Database Application in VB 6.0 2By Errol BooysensDifficulty: Beginners to IntermediateBuilding the Initial DesignCreating an application is a lot like building a house. For a well-built house, you need a blueprint to follow, but to create a good blueprint, you need to know whos going to live in the house and what their living styles will be. This will help you decide the number and sizes of the bedrooms, what colours to use, and so on. With an application, the blueprint is the technical specifications; the functional specifications are what you need to know to create the technical specifications. Now, many books teach the overall application design process by using very simplistic example applications. The description of the application we must develop is as follows: Personal Address/Phone Book This application will keep track of names, addresses, and phone numbers by name. It will allow as many different addresses and phone numbers as needed. Also, it will allow the entry of some personal information (such as birth date, spouses name, and children names) to be determined later. It will also provide reports in several formats and allow users to search the database for a particular person. Choosing the TasksDefining tasks for the application also defines its complexity. For example, this application is an address/phone book, if you decide to give users the ability to select a phone number and have the computer dial it for them. To add this functionality to the application, you need to know how to test for the existence of the modem, connect to that modem, and then actually dial that number. If you dont know how to add this functionality, you might consider waiting to add it after the initial version of the application is created and tested. This is what releasing new versions are all about. Keep the initial version of this application at a simpler level. The best way to design an application is to say to yourself, “ What would I want the application to do if I were the user?” Basically, youre the first and most important user of the application. This approach might not work for the larger, corporate-type application, but it does work for the smaller, more personal types. Even before you list the different tasks that the application will perform, you need to decide what type of application interface to use for this application. For this sample application, use the Explorer-style interface. To review this style, the initial form that users see and remain in for most of the application will resemble the one shown in Figure 1. Figure 1- This interface includes many of the controls that you have learned earlier. Okay, we have picked the application that youll create now you need to list the main functions that it will perform. Think of what the application is for and then list what you want it to do. From this reasoning, you should get the following list: Keep names and addresses; Search for a particular name; Print different types of reports; Allow for different users; and Enable easy maintenance of the application. Now, if this list seems simplistic, it is! You would then expand each item in this list until youre satisfied with the result. Lets expand each of the preceding tasks and add a more detail to the definition. Keeping Names and AddressesWhat do you really mean when you say “ Keep names and addresses?” It usually means that you want to keep track of the standard information found in any standard telephone book you look at. The first step in defining all the mini-tasks required for this topic is to list the data elements you want to put in the database. Table 1 lists the data elements that you can use for this type of application. Name Type First Name String Last Name String Spouse Name String Child Name String Address String City String State String ZIP Integer E-Mail Address String Phone Long Birth Date Date Notes String Table 1: Data Elements That Can Be Included In The Application Database. This list is pretty straight forward, but look more closely at it. It has elements such as phone numbers and birth date. Can a person not have more than one phone number? Yes! Or, if youre allowing users to enter the names of the persons spouse and children, you could have more than one birth date to enter. When the tables for this database are created, youll need to design the capability to handle copies of these types of elements. How do you want users to see the information? This section of the application will require the following forms: Book entry form: and Detailed En
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 维护信用的承诺书4篇
- 成长的烦恼与快乐:青春期的思考作文(15篇)
- 环境监测管理应对工作承诺书(5篇)
- 从电影少年派的奇幻漂流得到的启示读后感5篇
- 服务水准质量承诺书5篇范文
- 企业合同审批流程标准模板规避合同风险
- 我的未来梦想:对未来世界的想象作文10篇
- 我的校园趣事多校园记事作文(9篇)
- 2026年医疗投资研究合同
- 一次环保活动的事件记事作文(4篇)
- 生产加工企业消防安全培训
- 顾客财产控制程序、工作流程图表
- 山东省济南市历下区2024-2025学年三年级上学期期中英语试卷
- 2024-2025学年八年级化学沪科版(五四学制)全一册上学期期末复习卷①
- 全套教学课件《工程伦理学》
- DL∕T 1798-2018 换流变压器交接及预防性试验规程
- 生涯彩虹图完整版本
- 【正版授权】 ISO 7491:1985 EN Dental materials - Determination of colour stability of dental polymeric materials
- 《光伏发电工程安全预评价规程》(NBT 32039-2017)
- (高清版)DZT 0344-2020 石油天然气地质勘查总则
- 汽车零部件出厂检验报告
评论
0/150
提交评论