



版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、数据库( database,有时也可拼为data base)也可称为电子数据库,是为了方便计算机的快速查找和检索而专门组织起来的一组集合、数据和信息。 由于各种数据处理操作命令的支持,数据库的数据存储、恢复、修改和删除得以简化。数据库可以被存储在磁盘、磁带、光盘或其它的一些二级存储设备上。数据库由一个或一套文件组成。这些文件的信息可以被分解为多个记录,每个记录又包含一个或多个字段。字段是数据存储的基本单位,通常用来表示与数据库所描述的实体相关的某一属性信息。用户通过使用键盘和各种排序命令,能够快速查找、整理、 分组和选择在许多记录中的字段,还可以检索某一类数据或创建报表。除了最简单的, 所有数
2、据库都有复杂的数据关系和链接。用于处理和创建、访问和维护数据库记录相关任务的系统软件包被称为数据库管理系统(DBMS)。 DBMS 软件包中的程序可以在数据库和用户之间创建接口。(这些用户可以是应用程序员,管理员及其他需要信息的人员,和各种OS程序)一个 DBMS 可以组织、 处理和表示从数据库中选出来的数据元。这个功能可以让决策者能够搜索、 探索和查询数据库内容,从而获取到常规报告中不可用的、非经常性和无计划的答案。这些答案最初可能是模糊或者定义不清晰的,但是人们可以通过“浏览”数据库直到获取他们所需要的信息。简而言之,DBMS 会“管理”存储的数据项,以及结合公共数据库中所需的数据项用以回
3、答那些非程序员的查询。DBMS 由三个主要的部分组成:( 1)一个用来存储和检索文件数据的存储子系统;( 2)一个提供组织数据以及添加,删除,维护,更新数据的方法的建模和操作子系统;(3)还有一个是数据库和用户之间的接口。在提高数据库管理系统的价值和有效性方面正在展现以下一些重要发展趋势:管理人员:需要最新的信息以做出有效的决策。客户:需要越来越复杂的信息服务以及更多的有关其订单,发票和账号的当前信息。用户:发现他们可以使用传统的程序设计语言,在很短的一段时间内用数据库系统开发客户应用程序。商业公司:发现了信息的战略价值,他们利用数据库系统领先于竞争对手。数据库模型数据库模型描述了在数据库中结
4、构化和操作数据的方法,模型的结构部分描述了数据如何被描述 (例如树、 表等) :模型的操作部分规定了添加、删除、显示、 维护、打印、查询、选择、分类和更新数据的操作。分层模型第一个数据库管理系统使用的是分层结构模型,该模型把记录设计成树形结构。一些记录是根记录, 而其它所有记录则是唯一的父记录。树形结构的设计反应了哪些数据会被首先使用, 树的根记录会被首先使用,然后是根节点下面的记录,等等。分层模型得以发展是因为分层关系在商业领域普遍存在。如你所知,一个组织结构图表通常描述了一种分层关系:高层管理人员在最高层,中层管理人员在更低的层次,负责具体事务的雇员在最底层。在一个严格的分层结构体系中,
5、每个层次的管理者都有许多雇员或多个层次的雇员, 但是每个雇员只有一个管理者。分层结构就是以数据之间的一对多关系为特征的。在分层方法中, 在创建数据库的时候每个关系必须得明确定义。在分层数据库中的每一记录只能包含一个关键字段,每个关系只被允许存在于两个字段之间。由于数据并不总是遵循这一严格分层结构关系,所以可能会出现一些问题。关系模型1970 年,关于数据库的研究产生了一个重大突破,E. F. Codd提出了一种完全不同的方法来管理数据库。这种方法被称为关系模型,它使用了一个表作为数据结构。关系数据库是被最广泛使用的数据库结构。 数据被组织到对应的表。 每个表由被称为记录的行和被称为字段的列组成
6、。 每个记录包含了专用项目的字段值。 例如,一张表中包含了雇员的信息,一个记录则包含了数据的字段,比如一个人的姓、名和所居住的街道地址。结构化查询语言(SQL)是一种用于关系数据库中处理数据的查询语言。它是非程序性或者描述性语言, 用户只须指定一种类似于英语的描述, 用来确定操作, 记录或描述记录组合。查询优化编辑器会把这些描述翻译成数据库的操作过程并执行。网状模型网络模型通过在数据之间创建一个链表结构,使得子记录可以链接到多个父记录。这种记录和链接结合在一起的方法,就是所谓的指针。它是指向一个记录存储位置的存储地址。使用网状方法, 一个子记录可以链接到一个关键记录。同时, 它本身也可以作为一
7、个关键记录与其它一系列记录相链接。在历史上, 网状模型比其它数据库模型更具性能上的优势。但是在今天, 这种优势的特点只有在大容量和高速处理过程中才是最重要的,比如自动柜员机网络,航空预定系统等。分层和网状数据库都是专用程序。如果开发一个新的应用程序,那么维护数据的一致性的是非常困难的。例如,假如开发一个新的退休金应用程序,虽然数据是相同的,但是必须创建一个新的数据库。对象模型最新的数据库管理方法是使用对象模型, 记录由被称为对象的实体表示, 对象既可以存储数据,又可以提供方法或程序执行特定的任务。对象模型使用的查询语言与开发数据库程序所使用的面向对象的程序设计语言是一样的,这就产生了问题,因为
8、没有像SQL这样简单统一的查询语言。对象模型相对较新,只有很少的面向对象数据库存在。但是对象模型已经引起关注,因为人们希望在选择开发面向对象程序的时候希望有一个基于面向对象的数据库。分布式数据库同样,分布式数据库是一种数据库的各个部分都分别存储在物理上相互分离的计算机上的数据库。分布式数据库的一个目标是访问数据时不考虑其存储的物理位置。要注意的是,当用户和数据分开时,通信和网络则开始发挥作用。分布式数据库需要常驻于大型主机上的软件,这些软件类似个人和大型机之间的桥梁,解决数据格式不兼容的问题。在理想情况下, 大型主机上的数据库看起来像是一个大的信息仓库,而大部分处理则在个人计算机上完成。分布式
9、数据库的一个缺点是它经常以主机中心模型为基础,大型主机看起来像个主人,而个人计算机就好比一个奴隶。这个方法也有一些优势。通过集中控制下的数据库,前面提到的数据完整性和安全性的问题都得以解决。但是如今个人计算机、部门计算机, 和分布式处理都需要计算机和计算机上之间以及应用程序之间在相等或对等的基础上进行相互通信。在数据库中,客户机 / 服务器模型提供用于分发数据库的框架。一种利用许多相互连接的计算机上运行的数据库应用程序的方法是把应用程序分解为相互独立的又相互合作的部分。客户端是一个最终用户或通过网络申请资源的计算机程序。服务器是一个运行着的计算机软件,存储着那些通过网络传输的申请。当申请的资源
10、是数据库中的数据时,客户机 / 服务器模型则为分布式数据库提供了框架结构。文本服务器是一种通过网络提供文件访问的软件。专用文本服务器是指一台指定作为文本服务器的计算机。这是有用的,例如,如果文件很大并且要求快速访问,在这种情况下,一台微型计算机或大型主机将会被用作文本服务器。分布式文件服务器把文件分散在多个,而不是单独一个计算机上。后一种文本服务器的优势包括存储和检索其它计算机上的文件,并且可以消除每台计算机上的重复文件。但是, 这样会有一个很大的缺点。因为读写请求需要通过网络传播,所以在刷新文件的时候可能会产生问题。例如,两个用户同时请求同一个文件上的同一条记录并改变它时。 解决这个问题的办
11、法叫做记录锁定,这意味着在请求同一记录时, 第二个请求必须得等到第一个请求完成时才可获取到请求记录。同时,另外一些用户可以查看这个记录,但是同样不可以对这个记录做改变。数据库服务器是一个通过网络为数据库申请提供服务的软件例如,假设一个用户在他或她的个人计算机上输入一条数据查询指令,如果应用程序按照客户端/ 服务器模型设计,那么个人计算机上的查询语言通过网络传送数据库服务器上,并且当发现请求的数据时会发出通知。在工程界中可以找到许多分布式数据库系统的例子。如 SUN公司的网络文件系统 ( NFS)被应用到计算机辅助工程应用程序中,将数据分散到由SUN工作站组成的网络上的不同硬盘之间。分布式数据库
12、是一种革命性的进步, 因为把数据放在它被使用的地方是最合理的。例如,一个大公司各个部门的计算机应该把数据存放在本地,当公司的管理人员想整合部门数据时,这些数据应当允许被授权访问。DBMS软件会保护数据库的安全性和完整性,分布式数据库和非分布式数据库它们的用户而言将没有区别。Database Management Systems( 3th Edition ),Wiley ,2004,5-12A introduction to Database Management SystemRaghu RamakrishnanA database (sometimes spelled data base) i
13、s also called an electronic database, referringto any collection of data, or information, that is specially organized for rapid search and retrieval by a computer. Databases are structured to facilitate the storage, retrieval , modification, and deletion of data in conjunction with various data-proc
14、essing operations .Databases can be stored on magnetic disk or tape, optical disk, or some other secondary storage device.A database consists of a file or a set of files. The information in these files may be broken down into records, each of which consists of one or more fields. Fields are the basi
15、c units of data storage , and each field typically contains information pertaining to one aspect or attribute of theentity described by the database . Using keywords and various sorting commands, users canrapidly search , rearrange, group,and select the fieldsin many records to retrieve or createrep
16、orts on particular aggregate of data.Complex data relationships and linkages may be found in all but the simplest databases .The system software package that handles the difficult tasks associated with creating ,accessing, and maintaining database records is called a database management system(DBMS)
17、.The programs in a DBMS package establish an interface between the database itself and the users of the database. (These users may be applications programmers, managers and others with information needs, and various OS programs.)A DBMS can organize, process, and present selected data elements form t
18、he database. This capability enables decision makers to search, probe, and query database contents in orderto extract answers to nonrecurring and unplanned questions that aren reports. These questions might initially be vague and/or poorly t available in regular defined ,but people can“browse ” thro
19、ugh the database until they have the needed information. In short, the DBMSwill “ manage” the stored data items and assemble the needed items from the commondatabase in response to the queries of those who arentprogrammers.A database management system (DBMS) is composed of three major parts:(1)a sto
20、ragesubsystem that stores and retrieves data in files;(2) a modeling and manipulation subsystem thatprovides the means with which to organize the data and to add , delete, maintain, and update the data;(3)and an interface between the DBMS and its users. Several major trends are emerging that enhance
21、 the value and usefulness of database management systems;Managers: who require more up-to-data information to make effective decisionCustomers: who demand increasingly sophisticated information services and more current information about the status of their orders, invoices, and accounts.Users: who
22、find that they can develop custom applications with database systems in a fraction of the time it takes to use traditional programming languages.Organizations : that discover information has a strategic value; they utilize their database systems to gain an edge over their competitors.The Database Mo
23、delA data model describes a way to structure and manipulate the data in a database. The structural part of the model specifies how data should be represented(such as tree, tables, andso on ).The manipulative part of the model specifies the operation with which to add, delete, display, maintain, prin
24、t, search, select, sort and update the data.Hierarchical ModelThe first database management systems used a hierarchical model-that is-they arranged records into a tree structure. Some records are root records and all others have unique parent records. The structure of the tree is designed to reflect
25、 the order in which the data will be usedthat is ,the record at the root of a tree will be accessed first, then records one level below the root ,and so on.The hierarchical model was developed because hierarchical relationshipsare commonlyfoundin business applications. As you have known, an organiza
26、tionchar often describes ahierarchical relationship: top management is at the highest level, middle management at lowerlevels, and operational employees at the lowest levels. Note that within a strict hierarchy, eachlevel of management may have many employees or levels of employees beneath it, but e
27、achemployee has only one manager. Hierarchical data are characterizedby this one-to-manyrelationship among data.In the hierarchical approach, each relationship must be explicitly defined when the database is created. Each record in a hierarchical database can contain only one key field andonly one r
28、elationship is allowed between any two fields. This can create a problem because data do not always conform to such a strict hierarchy.Relational ModelA major breakthrough in database research occurred in 1970 when E. F. Coddproposed afundamentally different approach to database management called re
29、lational model ,which usesa table as its data structure.The relational database is the most widely used database structure. Data is organized intorelated tables. Each table is made up of rowscalled and columns called fields. Each recordcontains fields of data about some specific item. For example, i
30、n a table containing informationon employees, a record would contain fieldsofdata suchas a person s last name ,firstname ,and street address.Structured query language(SQL)is a querylanguage formanipulating datain a relationaldatabase .It is nonprocedural or declarative, in which the user need only s
31、pecify an English-likedescription that specifies the operation and the described record or combination of records. Aquery optimizer translates the description intoa procedure to performthe databasemanipulation.Network ModelThe network model creates relationships among data through a linked-list stru
32、cture in which subordinate records can be linked to more than one parent record. This approach combines records with links, which are called pointers. The pointers are addresses that indicate the location of a record. With the network approach, a subordinate record can be linked to a key record and
33、at the same time itself be a key record linked to other sets of subordinate records.The network mode historically has had a performance advantage over other database models. Today , such performance characteristics are only important in high-volume ,high-speed transaction processing such as automati
34、c teller machine networks or airline reservation system.Both hierarchical and network databases are application specific. If a new application is developed ,maintaining the consistency of databases in different applications can be very difficult. For example, suppose a new pension application is dev
35、eloped .The data are the same, but a new database must be created.Object ModelThe newest approach to database management uses an object model , in which recordsare represented by entities called objects that can both store data and provide methods or procedures to perform specific tasks.The query la
36、nguage used for the object model is the same object-oriented programming language used to develop the database application .This can create problems because there is no simple , uniform query language such as SQL . The object model is relatively new, and only a few examples of object-oriented databa
37、se exist. It has attracted attention because developers who choose an object-oriented programming language want a database based on an object-oriented model.Distributed DatabaseSimilarly , a distributed database is one in which different parts of the database reside onphysically separated computers
38、. One goal of distributed databases is the access ofinformationwithout regard to where the data might be stored. Keeping in mind that once the users and theirdata are separated , the communication and networking concepts come into play . Distributed databases require software that resides partially
39、in the larger computer. Thissoftware bridges the gap between personal and large computers and resolves the problems of incompatible data formats. Ideally, it would make the mainframe databases appear to be large libraries of information, with most of the processing accomplished on the personal compu
40、ter.A drawback to some distributed systems is that they are often based on what is called a mainframe-entire model , in which the larger host computer is seen as the master and the terminal or personal computer is seen as a slave. There are some advantages to this approach . With databases under cen
41、tralized control , many of the problems of data integrity that wementioned earlier are solved . But today s personal computers, departmental computers, and distributed processing require computers and their applications to communicate with each otheron a more equal or peer-to-peerbasis. In a databas
42、e, the client/servermodel provides theframework for distributing databases.One way to take advantage ofmany connected computers running database applicationsis to distributethe application into cooperatingparts that are independentof one anther. Aclient is an end user or computer program that reques
43、ts resources across a network. A server is acomputer running software that fulfills those requestsacross a network . When the resourcesare data in a database ,the client/server model provides the framework for distributing database.A file serve is software that provides access to files across a netw
44、ork. A dedicated file server is a single computer dedicated to being a file server. This is useful ,for example ,if the files are large and require fast access .In such cases, a minicomputer or mainframe would be used as a file server. A distributed file server spreads the files around on individual
45、 computers instead of placing them on one dedicated computer.Advantages of the latter server include the ability to store and retrieve files on other computers and the elimination of duplicate files on each computer. A major disadvantage , however, is that individual read/write requests are being moved across the network and problems can arise when updating files. Suppose a user requests a record fr
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 薪材苗木采购合同
- 电子支付中介合同
- 财务人员雇佣合同
- 电子书内容创新与策划考核试卷
- 诚信租房合同签署指南
- 粮食仓储企业绿色经济企业风险管理考核试卷
- 竹材运输中的损耗控制考核试卷
- 油墨的紫外光固化技术考核试卷
- 成人教育中的学习满意度调查考核试卷
- 管道工程可持续发展战略考核试卷
- GB/T 9775-2008纸面石膏板
- GB/T 12604.4-2005无损检测术语声发射检测
- GB/T 1229-2006钢结构用高强度大六角螺母
- 多中心结直肠癌临床研究生物样本库信息系统的建设与管理
- 消防管道支架制作安装标准2017.喷淋
- 曲柄连杆机构拆装教学教材课件
- 合格供应商年度评审计划
- 培训考试汇总金属胶接工艺简介
- Q-RJ 557-2017 航天型号产品禁(限)用工艺目录(公开)
- ZGM95G-1型中速辊式磨煤机使用和维护说明书
- SZ系列GPS标准时间同步钟使用说明
评论
0/150
提交评论