數(shù)據(jù)庫系統(tǒng)論文_第1頁
數(shù)據(jù)庫系統(tǒng)論文_第2頁
數(shù)據(jù)庫系統(tǒng)論文_第3頁
已閱讀5頁,還剩3頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、數(shù)據(jù)庫管理系統(tǒng)的介紹Raghu Ramakrish nan數(shù)據(jù)庫(database有時被拼作data base又稱為電子數(shù)據(jù)庫,是專門組織起 來的一組數(shù)據(jù)或信息,其目的是為了便于計算機快速查詢及檢索。數(shù)據(jù)庫的結(jié)構(gòu)是專門設(shè)計的,在各種數(shù)據(jù)處理操作命令的支持下,可以簡化數(shù)據(jù)的存儲、檢索、 修改和刪除。數(shù)據(jù)庫可以存儲在磁盤、磁帶、光盤或其他輔助存儲設(shè)備上。數(shù)據(jù)庫由一個或一套文件組成,其中的信息可以分解為記錄,每一條記錄又 包含一個或多個字段(或稱為域)。字段是數(shù)據(jù)存取的基本單位。數(shù)據(jù)庫用于描 述實體,其中的一個字段通常表示與實體的某一屬性相關(guān)的信息。通過關(guān)鍵字以及各種分類(排序)命令,用戶可以對多條

2、記錄的字段進行查詢,重新整理,分 組或選擇,以實體對某一類數(shù)據(jù)的檢索,也可以生成報表。所有數(shù)據(jù)庫(除最簡單的)中都有復(fù)雜的數(shù)據(jù)關(guān)系及其鏈接。處理與創(chuàng)建, 訪問以及維護數(shù)據(jù)庫記錄有關(guān)的復(fù)雜任務(wù)的系統(tǒng)軟件包叫做數(shù)據(jù)庫管理系統(tǒng)(DBMS )。DBMS軟件包中的程序在數(shù)據(jù)庫與其用戶間建立接口。(這些用戶可以是應(yīng)用程序員,管理員及其他需要信息的人員和各種操作系統(tǒng)程序)DBMS可組織、處理和表示從數(shù)據(jù)庫中選出的數(shù)據(jù)元。該功能使決策者能搜 索、探查和查詢數(shù)據(jù)庫的內(nèi)容,從而對正規(guī)報告中沒有的,不再出現(xiàn)的且無法預(yù) 料的問題做出回答。這些問題最初可能是模糊的并且(或者)是定義不恰當(dāng)?shù)模?但是人們可以瀏覽數(shù)據(jù)庫直到

3、獲得所需的信息。簡言之,DBMS將“管理”存儲 的數(shù)據(jù)項和從公共數(shù)據(jù)庫中匯集所需的數(shù)據(jù)項用以回答非程序員的詢問。DBMS由3個主要部分組成:(1)存儲子系統(tǒng),用來存儲和檢索文件中的 數(shù)據(jù);(2)建模和操作子系統(tǒng),提供組織數(shù)據(jù)以及添加、刪除、維護、更新數(shù) 據(jù)的方法;(3)用戶和DBMS之間的接口。在提高數(shù)據(jù)庫管理系統(tǒng)的價值和有 效性方面正在展現(xiàn)以下一些重要發(fā)展趨勢:1. 管理人員需要最新的信息以做出有效的決策。2. 客戶需要越來越復(fù)雜的信息服務(wù)以及更多的有關(guān)其訂單,發(fā)票和賬號的當(dāng) 前信息。3用戶發(fā)現(xiàn)他們可以使用傳統(tǒng)的程序設(shè)計語言,在很短的一段時間內(nèi)用數(shù)據(jù)庫系統(tǒng)開發(fā)客戶應(yīng)用程序。4商業(yè)公司發(fā)現(xiàn)了信

4、息的戰(zhàn)略價值,他們利用數(shù)據(jù)庫系統(tǒng)領(lǐng)先于競爭對 手。數(shù)據(jù)庫模型數(shù)據(jù)庫模型描述了在數(shù)據(jù)庫中結(jié)構(gòu)化和操縱數(shù)據(jù)的方法,模型的結(jié)構(gòu)部分規(guī)定了數(shù)據(jù)如何被描述(例如樹,表等):模型的操縱部分規(guī)定了數(shù)據(jù)添加、刪除、顯示、維護、打印、查找、選擇、排序和更新等操作。分層模型第一個數(shù)據(jù)庫管理系統(tǒng)使用的是分層模型, 也就是說,將數(shù)據(jù)記錄排列成樹 形結(jié)構(gòu)。一些記錄根目錄,在其他所有記錄中都有獨立的父記錄。 樹形結(jié)構(gòu)的設(shè) 計反映了數(shù)據(jù)被使用的順序,也就是首先訪問處于樹根位置的記錄, 接下來是根 下面的記錄等。分層模型的開發(fā)是因為分層關(guān)系在商業(yè)應(yīng)用中普遍存在。眾所周知,一個組織結(jié)構(gòu)圖表就描述了一種分層關(guān)系:高層管理人員在高

5、層,中層管理人員在較低 的層次,負責(zé)具體事務(wù)的雇員在底層。值得注意的是,在一個嚴格的分層結(jié)構(gòu)體 系中,在每個管理層下可能有多個雇員或多個層次的雇員,但每個雇員只有一個管理者。分層結(jié)構(gòu)數(shù)據(jù)的典型特征是數(shù)據(jù)之間的一對多關(guān)系。在分層方法中,當(dāng)數(shù)據(jù)庫建立時,每一關(guān)系即被明確地定義。在分層數(shù)據(jù)庫 中的每一記錄只能包含一個關(guān)鍵字段, 任意兩個字段之間只能有一種關(guān)系。由于 數(shù)據(jù)并不總是遵循這種嚴格的分層關(guān)系,所以這樣可能會出現(xiàn)一些問題。關(guān)系模型在1970年,數(shù)據(jù)庫研究取得了重大突破。E.F.Codd提出了一種截然不同的 數(shù)據(jù)庫管理方法,使用表作為數(shù)據(jù)結(jié)構(gòu),稱之為關(guān)系模型關(guān)系數(shù)據(jù)庫是使用最廣的數(shù)據(jù)結(jié)構(gòu),數(shù)據(jù)被

6、組織成關(guān)系表,每個表由稱作記錄 的行和稱作字段的列組成。每個記錄包含了專用項目的字段值。 例如,在一個包 含雇員信息的表中,一個記錄包含了像一個人姓名和地址這樣的字段的值。結(jié)構(gòu)化查詢語言(SQL)是一種在關(guān)系型數(shù)據(jù)庫中用于處理數(shù)據(jù)的查詢語言。 它是非過程化語言或者說是描述性的,用戶只須指定一種類似于英語的描述,用 來確定操作、記錄或描述記錄組合。查詢優(yōu)化器將這種描述翻譯為過程執(zhí)行數(shù)據(jù) 庫操作。網(wǎng)狀模型網(wǎng)狀模型在數(shù)據(jù)之間通過鏈接表結(jié)構(gòu)創(chuàng)建關(guān)系,子記錄可以鏈接到多個父記 錄。這種將記錄和鏈接捆綁到一起的方法叫做指針,它是指向一個記錄存儲位置 的存儲地址。使用網(wǎng)狀方法,一個子記錄可以鏈接到一個關(guān)鍵記

7、錄,同時,它本 身也可以作為一個關(guān)鍵記錄鏈接到其他一系列子記錄。在早期,網(wǎng)狀模型比其他模型更有性能優(yōu)勢,但是在今天,這種優(yōu)勢的特點只有在自動柜員機網(wǎng)絡(luò), 航空 預(yù)定系統(tǒng)等大容量和高速處理過程中才是最重要的。分層和網(wǎng)狀數(shù)據(jù)庫都是專用程序,如果開發(fā)一個新的應(yīng)用程序,那么在不同 的應(yīng)用程序中保持數(shù)據(jù)庫的一致性是非常困難的。例如開發(fā)一個退休金程序,需 要訪問雇員數(shù)據(jù),這一數(shù)據(jù)同時也被工資單程序訪問。 雖然數(shù)據(jù)是相同的,但是 也必須建立新的數(shù)據(jù)庫。 對象模型最新的數(shù)據(jù)庫管理方法是使用對象模型,記錄由被稱作對象的實體來描述,可以在對象中存儲數(shù)據(jù),同時提供方法或程序執(zhí)行特定的任務(wù)。對象模型使用的查詢語言與開

8、發(fā)數(shù)據(jù)庫程序所使用的面向?qū)ο蟮某绦蛟O(shè)計 語言是相同的,因為沒有像 SQL這樣簡單統(tǒng)一的查詢語言,所以會產(chǎn)生一些問 題。對象模型相對較新,僅有少數(shù)幾個面向?qū)ο蟮臄?shù)據(jù)庫實例。 它引起了人們的 關(guān)注,因為選擇面向?qū)ο蟪绦蛟O(shè)計語言的開發(fā)人員希望有一個基于在對象模型基 礎(chǔ)上的數(shù)據(jù)庫。分布式數(shù)據(jù)庫類似的,分布式數(shù)據(jù)庫指的是數(shù)據(jù)庫的各個部分分別存儲在物理上相互分開 的計算機上。分布式數(shù)據(jù)庫的一個目的是訪問數(shù)據(jù)信息時不必考慮其他位置。注意,一旦用戶和數(shù)據(jù)分開,通信和網(wǎng)絡(luò)則開始扮演重要角色。分布式數(shù)據(jù)庫需要部分常駐于大型主機上的軟件,這些軟件在大型機和個人 計算機之間建立橋梁,并解決數(shù)據(jù)格式不兼容的問題。 在理

9、想情況下,大型主機 上的數(shù)據(jù)庫看起來像是一個大的信息倉庫,而大部分處理則在個人計算機上完 成。分布式數(shù)據(jù)庫系統(tǒng)的一個缺點是它們常以主機中心模型為基礎(chǔ),在這種模型中,大型主機看起來好像是雇主,而終端和個人計算機看起來好像是奴隸。但是 這種方法也有許多優(yōu)點:由于數(shù)據(jù)庫的集中控制,前面提到的數(shù)據(jù)完整性和安全 性的問題就迎刃而解。當(dāng)今的個人計算機,部門級計算機和分布式處理都需要計 算機之間以及應(yīng)用程序之間在相等或?qū)Φ鹊幕A(chǔ)上相互通信,在數(shù)據(jù)庫中客戶機 /服務(wù)器模型為分布式數(shù)據(jù)庫提供了框架結(jié)構(gòu)。利用相互連接的在計算機上運行的數(shù)據(jù)庫應(yīng)用程序的一種方法是將程序分 解為相互獨立的部分。客戶端是一個最終用戶或通

10、過網(wǎng)絡(luò)申請資源的計算機程 序,服務(wù)器是一個運行著的計算機軟件, 存儲著那些通過網(wǎng)絡(luò)傳輸?shù)纳暾垺.?dāng)申 請的資源是數(shù)據(jù)庫中的數(shù)據(jù)時,客戶機 /服務(wù)器模型則為分布式數(shù)據(jù)庫提供了框 架結(jié)構(gòu)。文件服務(wù)器指的是一個通過網(wǎng)絡(luò)提供文件訪問的軟件,專門的文件服務(wù)器是 一臺被指定為文件服務(wù)器的計算機, 這是非常有用的。例如,如果文件比較大而 且需要快速訪問,在這種情況下,一臺微型計算機或大型主機將被用作文件服務(wù) 器。分布式文件服務(wù)器將文件分散到不同的計算機上,而不是將它們集中存放到 專門的文件服務(wù)器上。后一種文件服務(wù)器擁有在其他計算機上存儲和檢索文件的能力,并可以在每一臺計算機上消除重復(fù)文件。然而,一個重要的缺點

11、是每個讀寫請求需要在網(wǎng)絡(luò) 上傳播,在刷新文件時可能出現(xiàn)問題。假設(shè)一個用戶申請文件中的一個數(shù)據(jù)并修 改它,同時另外一個用戶也申請這個數(shù)據(jù)并修改它, 解決這種問題的方法叫做數(shù) 據(jù)鎖定,即第一個申請使其他申請?zhí)幱诘却隣顟B(tài), 直到完成第一個申請,其他用 戶可以讀取這個數(shù)據(jù),但不能修改數(shù)據(jù)庫服務(wù)器是一個通過網(wǎng)絡(luò)為數(shù)據(jù)庫申請?zhí)峁┓?wù)的軟件。例如,假設(shè)某個用戶在他的個人計算機上輸入了一個數(shù)據(jù)查詢命令,如果應(yīng)用程序按照客戶機 /服務(wù)器模型設(shè)計,那么個人計算機上的查詢語言通過網(wǎng)絡(luò)傳送到數(shù)據(jù)庫服務(wù)器 上,當(dāng)發(fā)現(xiàn)數(shù)據(jù)時發(fā)出通知。在工程界也有許多分布式數(shù)據(jù)庫的例子,如SUN公司的網(wǎng)絡(luò)文件系統(tǒng)(NFS) 被應(yīng)用到計算機

12、輔助工程應(yīng)用程序中,將數(shù)據(jù)分散到由SUN工作站組成的網(wǎng)絡(luò)上的不同硬盤之間。An In troduct ion to Database Man ageme nt SystemRaghu Ramakrish nanA database (sometimes spelled data base) is also called an electr onic database, re ferring to any collection of data or information, and that is specially organized for rapi d search and retriev

13、al by a computer. Databases are structured to facilitate the storage, retrieval, modification, and deletion of data in conjunction with various data-processi ng operatio ns .Databases can be stored on magn etic disk or tape, optical disk, or some other sec on dary storage device.A database consists

14、of a file or a set of files. The information in these files may b e broke n dow n in to records, each of which con sists of one or more fields. Fields are th e basic units of data storage, and each field typically contains information pertaining t o one aspect or attribute of the entity described by

15、 the database. Using keywords and various sort ing comma nds, users can rapidly search, rearra nge, group, and select the fi elds in many records to retrieve or create reports on particular aggregate of data.Complex data relatio nships and lin kages may be found in all but the simplest dat abases. T

16、he system software package that han dles the difficult tasks associated with cr eati ng, access ing, and maintaining database records is called a database man ageme nt s ystem(DBMS). The programs in a DBMS package establish an in terface betwee n the database itself and the users of the database. (T

17、hese users may be applicati ons progra mmers, man agers and others with in formati on n eeds, and various OS programs)A DBMS can orga ni ze, process, and prese nt selected data eleme nts form the dat abase. This capability enables decision makers to search, probe, and query database co ntents in ord

18、er to extract answers to nonrecurring and unplanned questions tharten 't available in regular reports. These questions might initially be vague and/or poorly defined, but people can “ browset”rough the database until they have the needed infor mation. In short, the DBMS will “ manage”e stored da

19、ta items and 5assemble the n eeded items from the com mon database in resp onse to the queries of those who aren 'programmers.A database man ageme nt system (DBMS) is composed of three major parts: (1) a storage subsystem that stores and retrieves data in files; (2) a modeling and manipulati on

20、subsystem that provides the means with which to orga nize the data and to add, dele te, maintain, and update the data; (3) and an in terface betwee n the DBMS and its user s. Several major trends are emergi ng that enhance the value and usef uln ess of databas e man ageme nt systems:1. Man agers: wh

21、o require more up-to-data in formati on to make effective decisio n.2. Customers: who dema nd in creas in gly sophisticated in formati on services and more curre nt in formati on about the status of their orders, inv oices, and acco un ts.3. Users: who find that they can develop custom applicati ons

22、 with database syste ms in a fraction of the time it takes to use traditional programming Ianguages.4. Orga nizatio ns: that discover in formatio n has a strategic value; they utilize thei r database systems to gai n an edge over their competitors. The Database ModelA data model describes a way to s

23、tructure and manipulate the data in a database. The structural part of the model specifies how data should be represe nted (such as tree ,tables, and so on). The manipulative part of the model specifies the operation with w hich to add, delete, display, maintain, print, search, select, sort and upda

24、te the data. Hi erarchical ModelThe first database man ageme nt systems used a hierarchical model-that is-they arr anged records into a tree structure. Some records are root records and all others have u nique pare nt records. The structure of the tree is desig ned to reflect the order in which the

25、data will be used that is, the record at the root of a tree will be accessed first, the n records one level below the root, and so on.The hierarchical model was developed because hierarchical relati on ships are co mmonly found in bus in ess applicati ons. As you have known, an orga ni zati on char

26、ofte n describes a hierarchical relatio nship: top man ageme nt is at the highest level, 6middle man ageme nt at lower levels, and operati onal employees at the lowest lev els. Note that with in a strict hierarchy, each level of man ageme nt may have many emp loyees or levels of employees ben eath i

27、t, but each employee has only one man ager. Hi erarchical data are characterized by this on e-to-ma ny relati on ship among data.In the hierarchical approach, each relati on ship must be explicitly defi ned whe n th e database is created. Each record in a hierarchical database can contain only one k

28、ey field and only one relati on ship is allowed betwee n any two fields. This can create a pr oblem because data do not always conform to such a strict hierarchy. Relational Mode lA major breakthrough in database research occurred in 1970 when E. F. Codd pr oposed a fun dame ntally differe nt approa

29、ch to database man ageme nt called relati onal model, which uses a table as its data structure.The relational database is the most widely used database structure. Data is organi zed into related tables. Each table is made up of rows called and colu mns called fields .Each record contains fields of d

30、ata about some specific item. For example, in a table containing information on employees, a record would contain fields of data such as a person 'last name, first name, and street address.Structured query Ian guage (SQL) is a query Ian guage for mani pulati ng data in a r elatio nal database. I

31、t is non procedural or declarative, in which the user n eed only spec ify an English-like description that specifies the operation and the described record or comb in ati on of records. A query optimizer tran slates the descripti on into a procedure t o perform the database man ipulati on. Network M

32、odelThe n etwork model creates relati on ships among data through a lin ked-list structu re in which subord in ate records can be lin ked to more tha n one pare nt record. This ap proach comb ines records with lin ks, which are called poi nters. The poin ters are addres ses that in dicate the locati

33、 on of a record. With the n etwork approach, a subord in ate rec ord can be linked to a key record and at the same time itself be a key record linked to other sets of subordi nate records. The n etwork mode historically has had a performa nee adva ntage over other database models. Today, such perfor

34、ma nee c haracteristics are only importa nt in high-volume, high-speed tran sacti on process ing su ch as automatic teller machi ne n etworks or airli ne reservati on system.Both hierarchical and n etwork databases are applicati on specific. If a new applic ati on is developed, maintaining the con s

35、iste ncy of databases in differe nt applicati ons c an be very difficult. For example, suppose a new pension applicati on is developed. Th e data are the same, but a new database must be created. Object ModelThe n ewest approach to database man ageme nt uses an object model, i n which re cords are r

36、eprese nted by en tities called objects that can both store data and provide me thods or procedures to perform specific tasks.The query Ian guage used for the object model is the same object-orie nted progra mming Ianguage used to develop the database application. This can create problems b ecause t

37、here is no simple, uniform query Ian guage such as SQL. The object model is r elatively n ew, and on ly a few examples of object-orie nted database exist. It has attract ed atte nti on because developers who choose an object-orie nted program ming Ian guag e want a database based on an object-orie n

38、ted model. Distributed DatabaseSimilarly, a distributed database is one in which different parts of the database re side on physically separated computers. One goal of distributed databases is the acces s of in formati on without regard to where the data might be stored. Keep ing in mind th at once

39、the users and their data being separated, the com muni cati on and n etwork ing c on cepts come into play.Distributed databases require software that resides partially in the larger computer.This software bridges the gap betwee n pers onal and large computers and resolves th e problems of in compati

40、ble data formats. Ideally, it would make the mai nframe databa ses appear to be large libraries of in formati on, with most of the process ing accomplish ed on the pers onal computer.A drawback to some distributed systems is that they are often based on what is ca lled a mainframe-entire model, in w

41、hich the larger host computer is seen as the 8master and the term inal or pers onal computer is see n as a slave. There are some a dva ntages to this approach. With databases un der cen tralized con trol, many of the pro blems of data integrity that we mentioned earlier are solved. Buttoday ' pe

42、rsonal com puters, departme ntal computers, and distributed process ing require computers and thei r applicati ons to com muni cate with each other on a more equal or peer-to-peer basis. I n a database, the clie nt/server model provides the framework for distributi ng databases.One way to take adva

43、ntage of many conn ected computers running database appli cations is to distribute the application into cooperating parts that are independent of o ne an ther. A clie nt is an end user or computer program that requests resources across a network. A server is a computer running software that fulfills

44、 those requests across a network. When the resources are data in a database, the client/server model provides t he framework for distribut ing database.A file server is software that provides access to files across a n etwork. A dedicate d file server is a single computer dedicated to being a file server. This is useful, for ex ample, if the files are large and require fast access. In such cases, a mini computer or mai nframe would be used as a file ser

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論