第三章 應(yīng)用層協(xié)議及其安全實(shí)踐領(lǐng)導(dǎo)者的搖籃_第1頁(yè)
第三章 應(yīng)用層協(xié)議及其安全實(shí)踐領(lǐng)導(dǎo)者的搖籃_第2頁(yè)
第三章 應(yīng)用層協(xié)議及其安全實(shí)踐領(lǐng)導(dǎo)者的搖籃_第3頁(yè)
第三章 應(yīng)用層協(xié)議及其安全實(shí)踐領(lǐng)導(dǎo)者的搖籃_第4頁(yè)
第三章 應(yīng)用層協(xié)議及其安全實(shí)踐領(lǐng)導(dǎo)者的搖籃_第5頁(yè)
已閱讀5頁(yè),還剩109頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡(jiǎn)介

1、Database technology and application1Zeng zhongpingEmail: Course Web page: http:/Database technology and applicationWhy Study Databases?lShift from computation to informationlat the “l(fā)ow end”: scramble to webspace (a mess!)lat the “high end”: scientific applicationslDatasets increasing in diversity a

2、nd volume. lDigital libraries, interactive video, Human Genome project, EOS project l. need for DBMS explodinglDBMS encompasses most of CSlOS, languages, theory, “AI”, multimedia, logic?FScience ComputingScience ComputingFProcessing ControlProcessing ControlFData Processing(70%)Data Processing(70%)D

3、atabase technology and applicationWhy Study DBMS?0We often use DBMS.Banking: all transactionsAirlines: reservations, schedulesUniversities: registration, gradesSales: customers, products, purchasesOnline retailers: order tracking, customized recommendationsManufacturing: production, inventory, order

4、s, supply chainHuman resources: employee records, salaries, tax deductions But DBMS just like a black box.0Try to open the black boxDatabase file system/pages/records/bytes/bitsPrinciples of DBMS and implement technologies 0Learn more about DBMSDatabase technology and applicationBenefits forDatabase

5、 technology and application5Text Books and References1.Raghu Ramakrishnan, Database Management Systems, McGraw Hill, 3rd edition, 2003 (text book).2.R. Elmasri, S.B. Navathe, Fundamentals of Database Systems, 4th edition, Addison-Wesley, 2004.3.3.A. Silberschatz, H.F. Korth, S. SudarshanA. Silbersch

6、atz, H.F. Korth, S. Sudarshan, Database , Database System Concepts, McGraw Hill, 4System Concepts, McGraw Hill, 4thth edition, 2002. edition, 2002.4.4.薩師煊,王珊:數(shù)據(jù)庫(kù)系統(tǒng)概論薩師煊,王珊:數(shù)據(jù)庫(kù)系統(tǒng)概論( (第四版第四版) ) ,高等教育出版社,高等教育出版社,2000.2000.中國(guó)人民大學(xué)中國(guó)人民大學(xué)5.周立柱、馮建華等SQL Server數(shù)據(jù)庫(kù)原理-設(shè)計(jì)與實(shí)現(xiàn)Database technology and applicationl采用

7、直觀的方式描述所有概念,并以結(jié)構(gòu)清晰的圖示和例子代替形式化的證明。l以銀行數(shù)據(jù)庫(kù)實(shí)例生動(dòng)地解釋重要概念,增強(qiáng)了本書(shū)的易讀性。l專(zhuān)門(mén)用三章來(lái)介紹特定的商品化數(shù)據(jù)庫(kù)系統(tǒng)Oracle、Microsoft SQL Server和IBM DB2的細(xì)節(jié)。l配有關(guān)于網(wǎng)狀模型和層次模型的聯(lián)機(jī)附錄 (英文)。Database technology and applicationl1950,負(fù)責(zé)全校經(jīng)濟(jì)和管理類(lèi)公共數(shù)學(xué)課的教學(xué)工作,文科數(shù)學(xué)。 l83年,與王珊第一版l數(shù)據(jù)庫(kù)泰斗l多次獎(jiǎng)項(xiàng)l多次規(guī)劃教材l使用學(xué)生眾多Database technology and application8Course Outline

8、lIntroduction to Database Management SystemslEntity-Relationship ModellThe Relational Data ModellRelational Algebra lSQL lRelational Database Design: NormalizationlMS SQL serverDatabase technology and application9GradinglAssignments 10 % lExperiments40 %lFinal Exam60 %Database technology and applica

9、tionDatabase technology and applicationDatabase technology and applicationDatabase technology and applicationDatalThe representative forms of information, including facts, concepts, rules, or any other kind of knowledge.lnumbers, characters, images or other methods of recording. lrepresent values th

10、at can be stored, processed, and transmitted by electronic systems,especially the computer. Database technology and applicationData instancel學(xué)生檔案中的學(xué)生記錄(李明,男,1972,江蘇,計(jì)算機(jī)系,1990)l數(shù)據(jù)的解釋l語(yǔ)義:學(xué)生姓名、性別、出生年月、籍貫、所在系別、入學(xué)時(shí)間l解釋?zhuān)豪蠲魇莻€(gè)大學(xué)生,1972年出生,江蘇人,1990年考入計(jì)算機(jī)系l數(shù)據(jù)的形式不能完全表達(dá)其內(nèi)容Database technology and applicationDatab

11、aseA very large, integrated collection of data stored in the computer.lLow reductdancelShare abilitylData independencelIntegrity management and controlDatabase technology and applicationlA very large, integrated collection of data stored in the computerlModels real-world enterprise.l Entities (e.g.,

12、 students, courses)l Relationships (e.g., Tarkan is taking CENG302)lA Database Management System (DBMS) is a software package designed to store and manage databases.Database Management System (DBMS)Database technology and applicationlOraclelSQL serverlSybaselMysqllDB2lINFORMIXlVFPDatabase management

13、 system examplesDatabase technology and applicationlData Definition lDDL,Data Definition LanguagelData Manipulation lDML,Data Manipulation LanguagelOperation ManagementlSetup and MaintainDBMS FUNCTIONDatabase technology and applicationlProvide User InterfacelProvide Data Manipulation LanguagelProvid

14、e Data Definition LanguagelProvide some toolslManage databaselMaintain databaseDBMS FUNCTION(continue)Database technology and applicationlC,VC,C+lVBlPOWERBUILDERlDELPHIlJAVAlASP/JSPlODBC/JDBClDatabase language (DDL,DML)Development tool kits/languageDatabase technology and applicationl開(kāi)放數(shù)據(jù)庫(kù)互連(ODBC)是M

15、ICROSOFT提出的數(shù)據(jù)庫(kù)訪問(wèn)接口標(biāo)準(zhǔn)。l開(kāi)放數(shù)據(jù)庫(kù)互連定義了訪問(wèn)數(shù)據(jù)庫(kù)的API一個(gè)規(guī)范,這些API獨(dú)立于不同廠商的DBMS,也獨(dú)立于具體的編程語(yǔ)言。Open Database ConnectOracleSql serversybaseaccessODBC APIODBC 驅(qū)動(dòng)C+VBPBJAVADatabase technology and applicationJava Database Connect(JDBC)Java數(shù)據(jù)庫(kù)連接,(Java Database Connectivity,簡(jiǎn)稱(chēng)JDBC)是Java語(yǔ)言中用來(lái)規(guī)范客戶(hù)端程序如何來(lái)訪問(wèn)數(shù)據(jù)庫(kù)的應(yīng)用程序接口,提供了諸如查詢(xún)和更新

16、數(shù)據(jù)庫(kù)中數(shù)據(jù)的方法。JDBC也是Sun Microsystems的商標(biāo)。它JDBC是面向關(guān)系型數(shù)據(jù)庫(kù)的。 Database technology and application硬件操作系統(tǒng)DBMS應(yīng)用開(kāi)發(fā)工具應(yīng)用系統(tǒng)Database technology and applicationDatabase Management System (DBMS)lDBMS contains information about a particular enterpriselCollection of interrelated data - DatabaselSet of programs to acces

17、s the data lAn environment that is both convenient and efficient to uselDatabase applicationsBanking: all transactionsAirlines: reservations, schedulesUniversities: registration, gradesSales: customers, products, purchasesOnline retailers: order tracking, customized recommendationsManufacturing: pro

18、duction, inventory, orders, supply chainHuman resources: employee records, salaries, tax deductions lDatabases touch all aspects of our livesDatabase technology and applicationDatabase System (DBS)數(shù)據(jù)庫(kù)系統(tǒng)一般由數(shù)據(jù)庫(kù)、操作系統(tǒng)、數(shù)據(jù)庫(kù)管理系統(tǒng)(及其開(kāi)發(fā)工具)、應(yīng)用系統(tǒng)、數(shù)據(jù)庫(kù)管理員(DBA)和用戶(hù)構(gòu)成。Database technology and applicationUSERUSERUSERA

19、pplicationDBMSOSDBDBA用戶(hù)用戶(hù)用戶(hù)應(yīng)用系統(tǒng)數(shù)據(jù)庫(kù)管理員Development Tools kits開(kāi)發(fā)工具Database systemDatabase technology and applicationDatabase system ArchitectureThe architecture of a database systems is greatly influenced by the underlying computer system on which the database is running:CentralizedClient-serverParalle

20、l (multi-processor)Distributed Browser/Server Database technology and applicationlCentralizedCentralized(集中式系統(tǒng))(集中式系統(tǒng)) DBMS和應(yīng)用程序以及與用戶(hù)終端進(jìn)行通信的軟件等都運(yùn)行在一臺(tái)宿主計(jì)算機(jī)上,所有的數(shù)據(jù)處理都是在宿主計(jì)算機(jī)中進(jìn)行。宿主計(jì)算機(jī)一般是大型機(jī)、中型機(jī)或小型機(jī)。應(yīng)用程序和DBMS之間通過(guò)操作系統(tǒng)管理的共享內(nèi)存或應(yīng)用任務(wù)區(qū)來(lái)進(jìn)行通信,DBMS利用操作系統(tǒng)提供的服務(wù)來(lái)訪問(wèn)數(shù)據(jù)庫(kù)。終端通常是非智能的,本身沒(méi)有處理能力。 集中系統(tǒng)的主要優(yōu)點(diǎn)是:具有集中的安全控制,以及處理大量

21、數(shù)據(jù)和支持大量并發(fā)用戶(hù)的能力。集中系統(tǒng)的主要缺點(diǎn)是:購(gòu)買(mǎi)和維持這樣的系統(tǒng)一次性投資太大,并且不適合分布處理。lPC(PC(個(gè)人計(jì)算機(jī)系統(tǒng)個(gè)人計(jì)算機(jī)系統(tǒng)) ) 與大型系統(tǒng)不同,通常個(gè)人計(jì)算機(jī)(微機(jī))上的DBMS功能和數(shù)據(jù)庫(kù)應(yīng)用功能是結(jié)合在一個(gè)應(yīng)用程序中的,這類(lèi)DBMS(如FoxPro、Acssce)的功能靈活,系統(tǒng)結(jié)構(gòu)簡(jiǎn)潔,運(yùn)行速度快,但這類(lèi)DBMS的數(shù)據(jù)共享性、安全性、完整性等控制功能比較薄弱。Database technology and applicationl在客戶(hù)在客戶(hù)/ /服務(wù)器服務(wù)器( (簡(jiǎn)記為簡(jiǎn)記為C/SC/S)結(jié)構(gòu)的數(shù)據(jù)庫(kù)系統(tǒng)中,數(shù)據(jù)結(jié)構(gòu)的數(shù)據(jù)庫(kù)系統(tǒng)中,數(shù)據(jù)處理任務(wù)被劃分為兩部

22、分:處理任務(wù)被劃分為兩部分:一部分運(yùn)行在客戶(hù)端,另一一部分運(yùn)行在客戶(hù)端,另一部分運(yùn)行在服務(wù)器端??蛻?hù)部分運(yùn)行在服務(wù)器端。客戶(hù)端負(fù)責(zé)應(yīng)用處理,數(shù)據(jù)庫(kù)服端負(fù)責(zé)應(yīng)用處理,數(shù)據(jù)庫(kù)服務(wù)器完成務(wù)器完成DBMSDBMS的核心功能。的核心功能。l這種模型中,客戶(hù)機(jī)上都必這種模型中,客戶(hù)機(jī)上都必須安裝應(yīng)用程序和工具,客須安裝應(yīng)用程序和工具,客戶(hù)端比較龐大、負(fù)擔(dān)比較重,戶(hù)端比較龐大、負(fù)擔(dān)比較重,而且系統(tǒng)安裝、維護(hù)、升級(jí)而且系統(tǒng)安裝、維護(hù)、升級(jí)和發(fā)布困難,從而影響效率。和發(fā)布困難,從而影響效率。 Client-server(客戶(hù)客戶(hù)/服務(wù)器系統(tǒng)服務(wù)器系統(tǒng))Database technology and applic

23、ation 一個(gè)分布式數(shù)據(jù)系統(tǒng)由一個(gè)邏輯數(shù)據(jù)庫(kù)組成,整個(gè)邏輯數(shù)據(jù)庫(kù)的數(shù)據(jù),存儲(chǔ)在分布于網(wǎng)絡(luò)中的多個(gè)結(jié)點(diǎn)上的物理數(shù)據(jù)庫(kù)中。在當(dāng)今的客戶(hù)/服務(wù)器結(jié)構(gòu)的數(shù)據(jù)庫(kù)系統(tǒng)中,服務(wù)器的數(shù)目可以是一個(gè)或多個(gè)。當(dāng)系統(tǒng)中存在多個(gè)數(shù)據(jù)庫(kù)服務(wù)器時(shí)就形成了分布系統(tǒng)。Distributed(分布式系統(tǒng))(分布式系統(tǒng))Database technology and applicationDistributed systemDatabase technology and application 隨著Internet的迅速普及,出現(xiàn)了三層客戶(hù)機(jī)/服務(wù)器模型:客戶(hù)機(jī)應(yīng)用服務(wù)器數(shù)據(jù)庫(kù)服務(wù)器。這種系統(tǒng)稱(chēng)為瀏覽器/服務(wù)器(Browser

24、/Server,簡(jiǎn)記為B/S)系統(tǒng)。Browser/Server(瀏覽器(瀏覽器/服務(wù)器系統(tǒng))服務(wù)器系統(tǒng))Database technology and applicationWhy We Need a DBMS?lthe increasing of the great number of information resourcesKB,MB,GB,TB,PB,EB,ZB,YB. lTraditional data management technology can not meet the increasing needslMassive benefits through data anal

25、ysis and processingWeather forecastairspaceBank and stocks marketlDBMS is the best way to solve the above questionsDatabase technology and applicationWhy Use a DBMS?lData independence and efficient access.(數(shù)據(jù)獨(dú)立性和高效訪問(wèn))lReduced application development time.(減少應(yīng)用程序開(kāi)發(fā)時(shí)間)lData integrity and security.(數(shù)據(jù)完

26、整性和安全性)lUniform data administration.(統(tǒng)一的數(shù)據(jù)管理)lConcurrent access, recovery from crashes.(并發(fā)控制和災(zāi)難恢復(fù))Database technology and applicationData management historylData managementlthe control of data handling operations-such as acquisition, analysis, translation, coding, storage, retrieval, and distributio

27、n of data lDevelopment lManual management (1940smid 1950s)lFile system management (1950smid 1960s)lDatabase management (1960s -)Database technology and applicationManual managementl1940s -1950slFocus on scientific computinglHardware no direct access storage devicelSoftware system no operation system

28、lData processing batch processingDatabase technology and applicationFile managementl1950s and early 1960s:lData processing using magnetic tapes for storageTapes provide only sequential accesslPunched cards for inputl1960s File system(In the early days, database applications were built directly on to

29、p of file systems)lDemandscientific managementlHardwaredisk、disk drumlSoftwarefile systemlProcessingOLAP、batch processingDatabase technology and applicationDrawbacks of using file systems lDrawbacks of using file systems to store data:lData redundancy and inconsistencyMultiple file formats, duplicat

30、ion of information in different fileslDifficulty in accessing data Need to write a new program to carry out each new tasklData isolation multiple files and formatslIntegrity problemsIntegrity constraints (e.g. account balance 0) become “buried” in program code rather than being stated explicitlyHard

31、 to add new constraints or change existing onesDatabase technology and applicationDrawbacks of using file systems(Cont.)lAtomicity of updatesFailures may leave database in an inconsistent state with partial updates carried outExample: Transfer of funds from one account to another should either compl

32、ete or not happen at alllConcurrent access by multiple usersConcurrent accessed needed for performanceUncontrolled concurrent accesses can lead to inconsistencies4Example: Two people reading a balance and updating it at the same timelSecurity problemsHard to provide user access to some, but not all,

33、 datalDatabase systems offer solutions to all the above problemsDatabase technology and applicationHistory of Database SystemslLate 1960s and 1970s:lHard disks allow direct access to datalNetwork and hierarchical data models in widespread uselTed Codd defines the relational data modelWould win the A

34、CM Turing Award for this workIBM Research begins System R prototypeUC Berkeley begins Ingres prototypelHigh-performance (for the era) transaction processingDatabase technology and applicationHistory (cont.)l1980s:lResearch relational prototypes evolve into commercial systemsSQL becomes industrial st

35、andardlParallel and distributed database systemslObject-oriented database systemsl1990s:lLarge decision support and data-mining applicationslLarge multi-terabyte data warehouseslEmergence of Web commercel2000s:lXML and XQuery standardslAutomated database administrationDatabase technology and applica

36、tionDatabase - Advantages lReduced data redundancy(冗余) lReduced updating errors and increased consistency(一致性) lGreater data integrity and independence from applications programs (完整性和獨(dú)立性)lImproved data access to users through use of host and query languages (訪問(wèn)能力)lImproved data security(數(shù)據(jù)安全) lRedu

37、ced data entry, storage, and retrieval costs(減少數(shù)據(jù)存取開(kāi)銷(xiāo)) lFacilitated development of new applications program(為開(kāi)發(fā)新程序提供便利 Database technology and applicationSummarylDBMS - how come todayDemand driven by application requirements Software developmentHardware developmentDatabase technology and application

38、l1、試述數(shù)據(jù)、數(shù)據(jù)庫(kù)、數(shù)據(jù)庫(kù)管理系統(tǒng)、數(shù)據(jù)庫(kù)系統(tǒng)的概念;l2、使用數(shù)據(jù)庫(kù)有什么好處?l3、試述文件系統(tǒng)和數(shù)據(jù)庫(kù)系統(tǒng)的區(qū)別與聯(lián)系。l4、名詞解釋?zhuān)簲?shù)據(jù)定義語(yǔ)言;數(shù)據(jù)操縱語(yǔ)言。l5、試述數(shù)據(jù)庫(kù)系統(tǒng)的功能。l6、以圖書(shū)館管理系統(tǒng)為例,試述開(kāi)發(fā)一個(gè)數(shù)據(jù)庫(kù)應(yīng)用程序的大致步驟。AssignmentDatabase technology and applicationDatabase technology and applicationshift from the real world to Concept schema l客觀對(duì)象的抽象過(guò)程-兩步抽象l現(xiàn)實(shí)世界中的客觀對(duì)象抽象為概念模型;現(xiàn)實(shí)世界中的客觀

39、對(duì)象抽象為概念模型;l把概念模型轉(zhuǎn)換為某一把概念模型轉(zhuǎn)換為某一DBMS支持的數(shù)據(jù)模型。支持的數(shù)據(jù)模型。 概念模型是現(xiàn)實(shí)世界到機(jī)器世界的一個(gè)中間層次。 數(shù)據(jù)庫(kù)中用數(shù)據(jù)模型來(lái)抽象、表示和處理現(xiàn)實(shí)世界中的數(shù)據(jù)。Database technology and applicationdataUser viewComputer viewDBMS- schema and data modelshift from the real world to digital worldDatabase technology and applicationConcept schemal概念模型的用途l概念模型用于信息世界

40、的建模概念模型用于信息世界的建模l是現(xiàn)實(shí)世界到機(jī)器世界的一個(gè)中間層次是現(xiàn)實(shí)世界到機(jī)器世界的一個(gè)中間層次l是數(shù)據(jù)庫(kù)設(shè)計(jì)的有力工具是數(shù)據(jù)庫(kù)設(shè)計(jì)的有力工具l數(shù)據(jù)庫(kù)設(shè)計(jì)人員和用戶(hù)之間進(jìn)行交流的語(yǔ)言數(shù)據(jù)庫(kù)設(shè)計(jì)人員和用戶(hù)之間進(jìn)行交流的語(yǔ)言l對(duì)概念模型的基本要求l較強(qiáng)的語(yǔ)義表達(dá)能力,能夠方便、直接地表達(dá)應(yīng)用中的各較強(qiáng)的語(yǔ)義表達(dá)能力,能夠方便、直接地表達(dá)應(yīng)用中的各種語(yǔ)義知識(shí)種語(yǔ)義知識(shí)l簡(jiǎn)單、清晰、易于用戶(hù)理解簡(jiǎn)單、清晰、易于用戶(hù)理解。Database technology and applicationredundant and inconsistentflexibilitymultiple database

41、sDatabase technology and applicationSchemaslExternal schema for user views ldefines the view of the data presented to the application programslConceptual schema integrates external schemata lthe logical structure of the databaselThe primary objective of this conceptual schema is to provide a consist

42、ent definition of the meanings and interrelationship of data which can be used to integrate, share, and manage the integrity of data.lInternal schema that defines physical storage structures ldescribes the internal formats of the data stored in the databaseDatabase technology and applicationAdvantag

43、e of Three Schemaslayered architectureDatabase technology and applicationView of DataAn architecture for a database system Database technology and applicationData IndependencelApplications insulated from how data is structured and stored.lLogical data independence: Protection from changes in logical

44、 structure of data.lPhysical data independence: Protection from changes in physical structure of data.* One of the most important benefits of using a DBMS!Database technology and applicationLevels of AbstractionlMany external schemata, single conceptual(logical) schema and physical schema.lExternal

45、schemata describe how users see the data. lConceptual schema defines logical structurelPhysical schema describes the files and indexes used.* Schemas are defined using DDL; data is modified/queried using DML.Physical SchemaConceptual SchemaExternalSchema 1ExternalSchema 3ExternalSchema 2Database tec

46、hnology and applicationLevels of AbstractionlA major purpose of a database system is to provide users with an abstract view of the data. The system hides certain details of how the data are stored and maintained. lPhysical level: describes how a record (e.g., customer) is stored.lLogical level: desc

47、ribes what data are stored in database, and the relationships among the data.type customer = recordcustomer_id : string; customer_name : string;customer_street : string;customer_city : integer;end;lView level: application programs hide details of data types. Views can also hide information (such as

48、an employees salary) for security purposes. Database technology and applicationInstances and SchemaslSimilar to types and variables in programming languageslSchema the logical structure of the database lExample: The database consists of information about a set of customers and accounts and the relat

49、ionship between themlAnalogous to type information of a variable in a programlPhysical schema: database design at the physical levellLogical schema: database design at the logical levellInstance the actual content of the database at a particular point in time lAnalogous to the value of a variablelPh

50、ysical Data Independence the ability to modify the physical schema without changing the logical schemalApplications depend on the logical schemalIn general, the interfaces between the various levels and components should be well defined so that changes in some parts do not seriously influence others

51、.Database technology and applicationStructure of a DBMSlA typical DBMS has a layered architecture.lThis is one of several possible architectures; each system has its own variations.Query Optimizationand ExecutionRelational OperatorsFiles and Access MethodsBuffer ManagementDisk Space ManagementDBThes

52、e layersmust considerconcurrencycontrol andrecoveryDatabase technology and applicationStructure of a DBMSDatabase technology and applicationData ModelsDatabase technology and applicationData ModelslA data model is a collection of concepts for describing data.lA schema is a description of a particula

53、r collection of data, using the given data model.lrequirementl能比較真實(shí)地模擬現(xiàn)實(shí)世界l容易為人所理解l便于在計(jì)算機(jī)上實(shí)現(xiàn)lThe relational model of data is the most widely used model today.lMain concept: relation, basically a table with rows and columns.lEvery relation has a schema, which describes the columns, or fields.Database

54、 technology and applicationData Models TypelEntity-Relationship data model (mainly for database design) lRelational modellObject-based data models (Object-oriented and Object-relational)lSemistructured data model (XML)lOther older models:lNetwork model lHierarchical modelDatabase technology and appl

55、icationSummarylConcept modellExternal schemalConcept schemalInternal schemalData modellRelational modelDatabase technology and applicationConcept schemal概念模型的用途l概念模型用于信息世界的建模概念模型用于信息世界的建模l是現(xiàn)實(shí)世界到機(jī)器世界的一個(gè)中間層次是現(xiàn)實(shí)世界到機(jī)器世界的一個(gè)中間層次l是數(shù)據(jù)庫(kù)設(shè)計(jì)的有力工具是數(shù)據(jù)庫(kù)設(shè)計(jì)的有力工具l數(shù)據(jù)庫(kù)設(shè)計(jì)人員和用戶(hù)之間進(jìn)行交流的語(yǔ)言數(shù)據(jù)庫(kù)設(shè)計(jì)人員和用戶(hù)之間進(jìn)行交流的語(yǔ)言l對(duì)概念模型的基本要求l較強(qiáng)的語(yǔ)

56、義表達(dá)能力,能夠方便、直接地表達(dá)應(yīng)用中的各較強(qiáng)的語(yǔ)義表達(dá)能力,能夠方便、直接地表達(dá)應(yīng)用中的各種語(yǔ)義知識(shí)種語(yǔ)義知識(shí)l簡(jiǎn)單、清晰、易于用戶(hù)理解簡(jiǎn)單、清晰、易于用戶(hù)理解。Database technology and applicationdefinitionsl實(shí)體(實(shí)體(Entity) “thing” or objectl屬性(屬性(Attribute) Property of (the entities of) an entity set.Attributes are simple values, e.g. integers or character strings.l實(shí)體型(實(shí)體型(Enti

57、ty Type)a class of entities with the same attributesl實(shí)體集(實(shí)體集(Entity Set)l同型實(shí)體的集合稱(chēng)為實(shí)體集同型實(shí)體的集合稱(chēng)為實(shí)體集Database technology and applicationExamplelEntity set Beers has two attributes, name and manf (manufacturer).lEach Beers entity has values for these two attributes, e.g. (Bud, Anheuser-Busch)Beersnameman

58、fDatabase technology and applicationdefinitions(conti.)l碼(碼(Key) l唯一標(biāo)識(shí)實(shí)體的屬性集稱(chēng)為碼。唯一標(biāo)識(shí)實(shí)體的屬性集稱(chēng)為碼。 l域(域(Domain) l屬性的取值范圍稱(chēng)為該屬性的域。屬性的取值范圍稱(chēng)為該屬性的域。 Database technology and applicationdefinitions(conti.)聯(lián)系(聯(lián)系(Relationship) an association between two or more entities that is of particular interest 現(xiàn)實(shí)世界中事物內(nèi)部以及

59、事物之間的聯(lián)系在信息世界中反映為實(shí)體內(nèi)現(xiàn)實(shí)世界中事物內(nèi)部以及事物之間的聯(lián)系在信息世界中反映為實(shí)體內(nèi)部的聯(lián)系和實(shí)體之間的聯(lián)系。部的聯(lián)系和實(shí)體之間的聯(lián)系。實(shí)體型間聯(lián)系 兩個(gè)實(shí)體型兩個(gè)實(shí)體型 一對(duì)一聯(lián)系(一對(duì)一聯(lián)系(1:1) 三個(gè)實(shí)體型三個(gè)實(shí)體型 一對(duì)多聯(lián)系(一對(duì)多聯(lián)系(1:n) 一個(gè)實(shí)體型一個(gè)實(shí)體型 多對(duì)多聯(lián)系(多對(duì)多聯(lián)系(m:n) Database technology and application兩個(gè)實(shí)體型間的聯(lián)系兩個(gè)實(shí)體型間的聯(lián)系 l一對(duì)一聯(lián)系 l如果對(duì)于實(shí)體集如果對(duì)于實(shí)體集A中的每一個(gè)實(shí)體,實(shí)體集中的每一個(gè)實(shí)體,實(shí)體集B中至多有一個(gè)中至多有一個(gè)實(shí)體與之聯(lián)系,反之亦然,實(shí)體與之聯(lián)系,反之亦

60、然,則稱(chēng)實(shí)體集則稱(chēng)實(shí)體集A與實(shí)體集與實(shí)體集B具有一具有一對(duì)一聯(lián)系。對(duì)一聯(lián)系。記為記為1:1。 l 實(shí)例班級(jí)與班長(zhǎng)之間的聯(lián)系:班級(jí)與班長(zhǎng)之間的聯(lián)系:一個(gè)班級(jí)只有一個(gè)正班長(zhǎng)一個(gè)班級(jí)只有一個(gè)正班長(zhǎng)一個(gè)班長(zhǎng)只在一個(gè)班中任職一個(gè)班長(zhǎng)只在一個(gè)班中任職Database technology and application兩個(gè)實(shí)體型間的聯(lián)系兩個(gè)實(shí)體型間的聯(lián)系 (續(xù)續(xù))l一對(duì)多聯(lián)系l如果對(duì)于實(shí)體集如果對(duì)于實(shí)體集A中的每一個(gè)實(shí)體,實(shí)體集中的每一個(gè)實(shí)體,實(shí)體集B中有中有n個(gè)實(shí)體個(gè)實(shí)體(n0)與之聯(lián)系,反之,對(duì)于實(shí)體集)與之聯(lián)系,反之,對(duì)于實(shí)體集B中的每一個(gè)實(shí)體,中的每一個(gè)實(shí)體,實(shí)體集實(shí)體集A中至多只有一個(gè)實(shí)體與之聯(lián)

溫馨提示

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

評(píng)論

0/150

提交評(píng)論