高級(jí)數(shù)據(jù)庫(kù)系統(tǒng) 第一章 簡(jiǎn)介_第1頁(yè)
高級(jí)數(shù)據(jù)庫(kù)系統(tǒng) 第一章 簡(jiǎn)介_第2頁(yè)
高級(jí)數(shù)據(jù)庫(kù)系統(tǒng) 第一章 簡(jiǎn)介_第3頁(yè)
高級(jí)數(shù)據(jù)庫(kù)系統(tǒng) 第一章 簡(jiǎn)介_第4頁(yè)
高級(jí)數(shù)據(jù)庫(kù)系統(tǒng) 第一章 簡(jiǎn)介_第5頁(yè)
已閱讀5頁(yè),還剩29頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡(jiǎn)介

1、Database System Concepts, 5th Ed.Silberschatz, Korth and SudarshanSee www.db- for conditions on re-use Silberschatz, Korth and Sudarshan1.2Database System Concepts - 5th Edition, May 23, 2005nPurpose of Database SystemsnDatabase LanguagesnRelational DatabasesnDatabase DesignnData ModelsnDatabase Int

2、ernalsnDatabase Users and AdministratorsnOverall StructurenHistory of Database SystemsSilberschatz, Korth and Sudarshan1.3Database System Concepts - 5th Edition, May 23, 2005nDBMS contains information about a particular enterpriselCollection of interrelated datalSet of programs to access the data lA

3、n environment that is both convenient and efficient to usenDatabase Applications:lBanking: all transactionslAirlines: reservations, scheduleslUniversities: registration, gradeslSales: customers, products, purchaseslOnline retailers: order tracking, customized recommendationslManufacturing: productio

4、n, inventory, orders, supply chainlHuman resources: employee records, salaries, tax deductionsnDatabases touch all aspects of our livesSilberschatz, Korth and Sudarshan1.4Database System Concepts - 5th Edition, May 23, 2005nIn the early days, database applications were built directly on top of file

5、systemsnDrawbacks of using file systems 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 probl

6、ems4Integrity constraints (e.g. account balance 0) become “buried” in program code rather than being stated explicitly4Hard to add new constraints or change existing onesSilberschatz, Korth and Sudarshan1.5Database System Concepts - 5th Edition, May 23, 2005nDrawbacks of using file systems (cont.) l

7、Atomicity of updates4Failures may leave 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 co

8、ncurrent accesses can lead to inconsistencies 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.6Database System

9、Concepts - 5th Edition, May 23, 2005nPhysical 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 : s

10、tring;end;nView level: application programs hide details of data types. Views can also hide information (such as an employees salary) for security purposes. Silberschatz, Korth and Sudarshan1.7Database System Concepts - 5th Edition, May 23, 2005An architecture for a database system Silberschatz, Kor

11、th and Sudarshan1.8Database System Concepts - 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)lAnalogo

12、us to type information of a variable in 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

13、 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.Silberschatz, Korth and Sud

14、arshan1.9Database System Concepts - 5th 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)n

15、Semistructured data model (XML)nOther older models:lNetwork model lHierarchical modelSilberschatz, Korth and Sudarshan1.10Database System Concepts - 5th Edition, May 23, 2005nLanguage for accessing and manipulating the data organized by the appropriate data modellDML also known as query languagenTwo

16、 classes of languages lProcedural user specifies what data is required and how to get those data lDeclarative (nonprocedural) user specifies what data is required without specifying how to get those datanSQL is the most widely used query languageSilberschatz, Korth and Sudarshan1.11Database System C

17、oncepts - 5th Edition, May 23, 2005nSpecification notation for defining the database schemaExample:create table account ( account_number char(10), branch_name char(10), balance integer)nDDL compiler generates a set of tables stored in a data dictionarynData dictionary contains metadata (i.e., data a

18、bout data)lDatabase schema lData storage and definition language 4Specifies the storage structure and access methods usedlIntegrity constraints4Domain constraints4Referential integrity (e.g. branch_name must correspond to a valid branch in the branch table)lAuthorizationSilberschatz, Korth and Sudar

19、shan1.12Database System Concepts - 5th Edition, May 23, 2005nExample of tabular data in the relational modelAttributesSilberschatz, Korth and Sudarshan1.13Database System Concepts - 5th Edition, May 23, 2005Silberschatz, Korth and Sudarshan1.14Database System Concepts - 5th Edition, May 23, 2005nSQL

20、: widely used non-procedural languagelExample: Find the name of the customer with customer-id 192-83-7465selectcustomer.customer_namefromcustomerwherecustomer.customer_id = 192-83-7465lExample: Find the balances of all accounts held by the customer with customer-id 192-83-7465selectaccount.balancefr

21、om depositor, accountwhere depositor.customer_id = 192-83-7465 anddepositor.account_number = account.account_numbernApplication programs generally access databases through one oflLanguage extensions to allow embedded SQLlApplication program interface (e.g., ODBC/JDBC) which allow SQL queries to be s

22、ent to a databaseSilberschatz, Korth and Sudarshan1.15Database System Concepts - 5th Edition, May 23, 2005The process of designing the general structure of the database:nLogical Design Deciding on the database schema. Database design requires that we find a “good” collection of relation schemas.lBus

23、iness decision What attributes should we record in the database?lComputer Science decision What relation schemas should we have and how should the attributes be distributed among the various relation schemas?nPhysical Design Deciding on the physical layout of the database Silberschatz, Korth and Sud

24、arshan1.16Database 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 objects4Described by a set of attributeslRelationship: an association among several ent

25、itiesnRepresented diagrammatically by an entity-relationship diagram:Silberschatz, Korth and Sudarshan1.17Database System Concepts - 5th Edition, May 23, 2005nObject-oriented data modelnObject-relational data modelSilberschatz, Korth and Sudarshan1.18Database System Concepts - 5th Edition, May 23, 2

26、005(web browser)OldModernSilberschatz, Korth and Sudarshan1.19Database System Concepts - 5th Edition, May 23, 2005nStorage managementnQuery processingnTransaction processingSilberschatz, Korth and Sudarshan1.20Database System Concepts - 5th Edition, May 23, 2005nStorage manager is a program module t

27、hat 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 and updating of datanIssues:lSto

28、rage accesslFile organizationlIndexing and hashingSilberschatz, Korth and Sudarshan1.21Database System Concepts - 5th Edition, May 23, 20051. Parsing and translation2. Optimization3. EvaluationSilberschatz, Korth and Sudarshan1.22Database System Concepts - 5th Edition, May 23, 2005nAlternative ways

29、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 relations which the database must

30、maintainlNeed to estimate statistics for intermediate results to compute cost of complex expressionsSilberschatz, Korth and Sudarshan1.23Database System Concepts - 5th Edition, May 23, 2005nA transaction is a collection of operations that performs a single logical function in a database applicationn

31、Transaction-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 concurrent transactions, to ensure t

32、he consistency of the database. Silberschatz, Korth and Sudarshan1.24Database System Concepts - 5th Edition, May 23, 2005Silberschatz, Korth and Sudarshan1.25Database System Concepts - 5th Edition, May 23, 2005n1950s and early 1960s:lData processing using magnetic tapes for storage4Tapes provide onl

33、y sequential accesslPunched cards for inputnLate 1960s and 1970s:lHard disks allow direct access to datalNetwork and hierarchical data models in widespread uselTed Codd defines the relational data model4Would win the ACM Turing Award for this work4IBM Research begins System R prototype4UC Berkeley b

34、egins Ingres prototypelHigh-performance (for the era) transaction processingSilberschatz, Korth and Sudarshan1.26Database System Concepts - 5th Edition, May 23, 2005n1980s:lResearch relational prototypes evolve into commercial systems4SQL becomes industry standardlParallel and distributed database s

35、ystemslObject-oriented database systemsn1990s:lLarge decision support and data-mining applicationslLarge multi-terabyte data warehouseslEmergence of Web commercen2000s:lXML and XQuery standardslAutomated database administrationlIncreasing use of highly parallel database systemslWeb-scale distributed

36、 data storage systemsDatabase System Concepts, 5th Ed.Silberschatz, Korth and SudarshanSee www.db- for conditions on re-use Silberschatz, Korth and Sudarshan1.28Database System Concepts - 5th Edition, May 23, 2005Users are differentiated by the way they expect to interact with the systemnApplication

37、 programmers interact with system through DML callsnSophisticated users form requests in a database query languagenSpecialized users write specialized database applications that do not fit into the traditional data processing frameworknNave users invoke one of the permanent application programs that

38、 have been written previouslylExamples, people accessing database over the web, bank tellers, clerical staffSilberschatz, Korth and Sudarshan1.29Database System Concepts - 5th Edition, May 23, 2005nCoordinates all the activities of the database systemlhas a good understanding of the enterprises info

39、rmation resources and needs.nDatabase administrators duties include:lStorage structure and access method definitionlSchema and physical organization modificationlGranting users authority to access the databaselBacking up datalMonitoring performance and responding to changes4Database tuningSilberschatz, Korth and Sudarshan1.30Database System Concepts - 5th Edition, May 23, 2005The architecture of a database systems is gr

溫馨提示

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

評(píng)論

0/150

提交評(píng)論