版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、Silberschatz, Korth and Sudarshan1.1Database System Concepts - 5th Edition, May 23, 2005Database System Concepts, 5th Ed.Silberschatz, Korth and SudarshanSee www.db- for conditions on re-use Silberschatz, Korth and Sudarshan1.3Database System Concepts - 5th Edition, May 23, 2005nDatabase-System Appl
2、icationsnPurpose of Database SystemsnView of DatanDatabase LanguagesnRelational DatabasesnDatabase DesignnObject-based and semistructured databasesnData Storage and QueryingnTransaction ManagementnDatabase ArchitecturenDatabase Users and AdministratorsnOverall StructurenHistory of Database SystemsSi
3、lberschatz, Korth and Sudarshan1.4Database System Concepts - 5th Edition, May 23, 2005nDBMS provides an environment that is both convenient and efficient to use. It contains lA collection of interrelated data, i.e. database which contains information about a particular enterpriselA set of programs t
4、o access the data nDatabase Applications:lBanking: all transactionslAirlines: reservations, scheduleslUniversities: registration, gradeslSales: customers, products, purchaseslOnline retailers: order tracking, customized recommendationslManufacturing: production, inventory, orders, supply chainlHuman
5、 resources: employee records, salaries, tax deductionsnDatabases touch all aspects of our livesSilberschatz, Korth and Sudarshan1.5Database System Concepts - 5th Edition, May 23, 2005nIn the early days, database applications were built directly on top of file systemsnDrawbacks of using file systems
6、to store data:lData redundancy and inconsistency4Multiple file formats, duplication of information in different fileslDifficulty in accessing data 4Need to write a new program to carry out each new tasklData isolation multiple files and formatslIntegrity problems4Integrity constraints (e.g. account
7、balance 0) become “buried” in program code rather than being stated explicitly4Hard to add new constraints or change existing onesSilberschatz, Korth and Sudarshan1.6Database System Concepts - 5th Edition, May 23, 2005nDrawbacks of using file systems (cont.) lAtomicity of updates4Failures may leave
8、database in an inconsistent state with partial updates carried out4Example: Transfer of funds from one account to another should either complete or not happen at alllConcurrent access by multiple users4Concurrent accessed needed for performance4Uncontrolled concurrent accesses can lead to inconsiste
9、ncies Example: Two people reading a balance and updating it at the same timelSecurity problems4Hard to provide user access to some, but not all, datanDatabase systems offer solutions to all the above problemsSilberschatz, Korth and Sudarshan1.7Database System Concepts - 5th Edition, May 23, 2005nPhy
10、sical level: describes how a record (e.g., customer) is stored.nLogical level: describes data stored in database, and the relationships among the data.type customer = recordcustomer_id : string; customer_name : string;customer_street : string;customer_city : integer;end;nView level: application prog
11、rams hide details of data types. Views can also hide information (such as an employees salary) for security purposes. Silberschatz, Korth and Sudarshan1.8Database System Concepts - 5th Edition, May 23, 2005An architecture for a database system Silberschatz, Korth and Sudarshan1.9Database System Conc
12、epts - 5th Edition, May 23, 2005nSimilar to types and variables in programming languagesnSchema the logical structure of the database lExample: The database consists of information about a set of customers and accounts and the relationship between them)lAnalogous to type information of a variable in
13、 a programlPhysical schema: database design at the physical levellLogical schema: database design at the logical levelnInstance the actual content of the database at a particular point in time lAnalogous to the value of a variablenPhysical Data Independence the ability to modify the physical schema
14、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.Silberschatz, Korth and Sudarshan1.10Database System Concepts - 5t
15、h Edition, May 23, 2005nA collection of tools for describing lData lData relationshipslData semanticslData constraintsnRelational modelnEntity-Relationship data model (mainly for database design) nObject-based data models (Object-oriented and Object-relational)nSemistructured data model (XML)nOther
16、older models:lNetwork model lHierarchical modelSilberschatz, Korth and Sudarshan1.11Database System Concepts - 5th Edition, May 23, 2005nModels an enterprise as a collection of entities and relationshipslEntity: a “thing” or “object” in the enterprise that is distinguishable from other objects4Descr
17、ibed by a set of attributeslRelationship: an association among several entitiesnRepresented diagrammatically by an entity-relationship diagram:Silberschatz, Korth and Sudarshan1.12Database System Concepts - 5th Edition, May 23, 2005nExample of tabular data in the relational modelAttributesSilberscha
18、tz, Korth and Sudarshan1.13Database System Concepts - 5th Edition, May 23, 2005Silberschatz, Korth and Sudarshan1.14Database System Concepts - 5th Edition, May 23, 2005nA database system provides a data definition language (DDL) to specify the database schema and a data manipulation language (DML) t
19、o express database queries and updates.Silberschatz, Korth and Sudarshan1.15Database System Concepts - 5th Edition, May 23, 2005nSpecification notation for defining the database schemaExample:create table account ( account-number char(10), balance integer)nDDL compiler generates a set of tables stor
20、ed in a data dictionarynData dictionary contains metadata (i.e., data about data)lDatabase schema lIndexlIntegrity constraints4Domain constraints4Referential integrity (references constraint in SQL)4AssertionslAuthorizationSilberschatz, Korth and Sudarshan1.16Database System Concepts - 5th Edition,
21、May 23, 2005nLanguage for accessing and manipulating the data organized by the appropriate data modellDML also known as query languagenTwo classes of languages lProcedural user specifies what data is required and how to get those data lDeclarative (nonprocedural) user specifies what data is required
22、 without specifying how to get those datanSQL is the most widely used query languageSilberschatz, Korth and Sudarshan1.17Database System Concepts - 5th Edition, May 23, 2005nSQL: widely used non-procedural languagelExample: Find the name of the customer with customer-id 192-83-7465selectcustomer.cus
23、tomer_namefromcustomerwherecustomer.customer_id = 192-83-7465lExample: Find the balances of all accounts held by the customer with customer-id 192-83-7465selectaccount.balancefrom depositor, accountwhere depositor.customer_id = 192-83-7465 anddepositor.account_number = account.account_numbernApplica
24、tion programs generally access databases through one oflLanguage extensions to allow embedded SQLlApplication program interface (e.g., ODBC/JDBC) which allow SQL queries to be sent to a databaseSilberschatz, Korth and Sudarshan1.18Database System Concepts - 5th Edition, May 23, 2005nExtend the relat
25、ional data model by including object orientation and constructs to deal with added data types.nAllow attributes of tuples to have complex types, including non-atomic values such as nested relations.nPreserve relational foundations, in particular the declarative access to data, while extending modeli
26、ng power.nProvide upward compatibility with existing relational languages.Silberschatz, Korth and Sudarshan1.19Database System Concepts - 5th Edition, May 23, 2005nDefined by the WWW Consortium (W3C)nOriginally intended as a document markup language not a database languagenThe ability to specify new
27、 tags, and to create nested tag structures made XML a great way to exchange data, not just documentsnXML has become the basis for all new generation data interchange formats.nA wide variety of tools is available for parsing, browsing and querying XML documents/dataSilberschatz, Korth and Sudarshan1.
28、20Database System Concepts - 5th Edition, May 23, 2005Users are differentiated by the way they expect to interact with the systemnApplication programmers interact with system through DML callsnSophisticated users form requests in a database query languagenSpecialized users write specialized database
29、 applications that do not fit into the traditional data processing frameworknNave users invoke one of the permanent application programs that have been written previouslylExamples, people accessing database over the web, bank tellers, clerical staffSilberschatz, Korth and Sudarshan1.21Database Syste
30、m Concepts - 5th Edition, May 23, 2005nCoordinates all the activities of the database system; the database administrator has a good understanding of the enterprises information resources and needs.nDatabase administrators duties include:lSchema definitionlStorage structure and access method definiti
31、onlSchema and physical organization modificationlGranting user authority to access the databaselSpecifying integrity constraintslActing as liaison with userslMonitoring performance and responding to changes in requirementsSilberschatz, Korth and Sudarshan1.22Database System Concepts - 5th Edition, M
32、ay 23, 2005The architecture of a database systems is greatly influenced by the underlying computer system on which the database is running:nCentralizednClient-servernParallel (multi-processor)nDistributed Silberschatz, Korth and Sudarshan1.23Database System Concepts - 5th Edition, May 23, 2005nStora
33、ge manager is a program module that provides the interface between the low-level data stored in the database and the application programs and queries submitted to the system.nThe storage manager is responsible to the following tasks: lInteraction with the file manager lEfficient storing, retrieving
34、and updating of datanIssues:lStorage accesslFile organizationlIndexing and hashingSilberschatz, Korth and Sudarshan1.24Database System Concepts - 5th Edition, May 23, 20051. Parsing and translation2. Optimization3. EvaluationSilberschatz, Korth and Sudarshan1.25Database System Concepts - 5th Edition
35、, May 23, 2005nAlternative ways of evaluating a given querylEquivalent expressionslDifferent algorithms for each operationnCost difference between a good and a bad way of evaluating a query can be enormousnNeed to estimate the cost of operationslDepends critically on statistical information about re
36、lations which the database must maintainlNeed to estimate statistics for intermediate results to compute cost of complex expressionsSilberschatz, Korth and Sudarshan1.26Database System Concepts - 5th Edition, May 23, 2005nA transaction is a collection of operations that performs a single logical fun
37、ction in a database applicationnTransaction-management component ensures that the database remains in a consistent (correct) state despite system failures (e.g., power failures and operating system crashes) and transaction failures.nConcurrency-control manager controls the interaction among the conc
38、urrent transactions, to ensure the consistency of the database. Silberschatz, Korth and Sudarshan1.27Database System Concepts - 5th Edition, May 23, 2005Silberschatz, Korth and Sudarshan1.28Database System Concepts - 5th Edition, May 23, 2005n1950s and early 1960s:lData processing using magnetic tap
39、es for storage4Tapes provide only sequential accesslPunched cards for inputThe first general-purpose DBMS is Integrated Data Store (network data model)whose designer is Charles Bachman at GE in earlier 1960s. Charles win the Turing Award in 1973.nLate 1960s and 1970s:lHard disks allow direct access to datalNetwork and hierarchical data models in widespread use in late 1960s, IBM developed IMS DBMS which is used now in web based travel services such asTravelocity.lE.F. Codd defines the relational da
溫馨提示
- 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)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 乙肝患者購買合同范本
- 2025年度人工智能與制造業(yè)融合項目合同補(bǔ)充協(xié)議示范文本
- 保羅皮爾斯合同范本
- 出賣公司合同范本
- 買房銀行抵押合同范本
- 2025年度海鮮餐飲連鎖門店食材供應(yīng)合同
- 兔寶寶合同范本
- 上門做飯創(chuàng)業(yè)計劃書國家層面
- 供氣標(biāo)準(zhǔn)合同范本
- 工程量清單及招標(biāo)控制價編制方案
- 納龍心電說明書
- 2023湖北成人學(xué)位英語考試真題及答案1
- 《大數(shù)據(jù)金融》教學(xué)大綱(第六學(xué)期)附課程考核標(biāo)準(zhǔn)
- 物業(yè)管理企業(yè)用工風(fēng)險與防范對策
- 拜耳法氧化鋁生產(chǎn)工藝流程框圖
- 零售藥店處方藥銷售自查整改報告word(范文)
- 叉車日常維護(hù)保養(yǎng)檢查記錄表
- 心源性休克的護(hù)理.ppt課件
- 精品解析:2022年黑龍江省哈爾濱市中考語文試題(原卷版)
- 單位事故隱患排查治理制度及臺賬
評論
0/150
提交評論