數(shù)據(jù)庫系統(tǒng)英文課件:ch01 Introduction_第1頁
數(shù)據(jù)庫系統(tǒng)英文課件:ch01 Introduction_第2頁
數(shù)據(jù)庫系統(tǒng)英文課件:ch01 Introduction_第3頁
數(shù)據(jù)庫系統(tǒng)英文課件:ch01 Introduction_第4頁
數(shù)據(jù)庫系統(tǒng)英文課件:ch01 Introduction_第5頁
已閱讀5頁,還剩26頁未讀, 繼續(xù)免費閱讀

下載本文檔

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

文檔簡介

1、Chapter 1: Introduction1Chapter 1: IntroductionPurpose of Database SystemsView of DataDatabase LanguagesRelational DatabasesDatabase DesignObject-based and semistructured databasesData Storage and QueryingTransaction ManagementDatabase ArchitectureDatabase Users and AdministratorsOverall StructureHi

2、story of Database Systems2Database Management System (DBMS)DBMS contains information about a particular enterpriseCollection of interrelated dataSet of programs to access the data An environment that is both convenient and efficient to useDatabase Applications:Banking: all transactionsAirlines: rese

3、rvations, schedulesUniversities: registration, gradesSales: customers, products, purchasesOnline retailers: order tracking, customized recommendationsManufacturing: production, inventory, orders, supply chainHuman resources: employee records, salaries, tax deductionsDatabases touch all aspects of ou

4、r lives3Purpose of Database SystemsIn the early days, database applications were built directly on top of file systemsDrawbacks of using file systems to store data:Data redundancy and inconsistencyMultiple file formats, duplication of information in different filesDifficulty in accessing data Need t

5、o write a new program to carry out each new taskData isolation multiple files and formats, difficult to retrieve theappropriate data.Integrity problemsIntegrity constraints (e.g. account balance 0) become “buried” in program code rather than being stated explicitlyHard to add new constraints or chan

6、ge existing ones4Purpose of Database Systems (Cont.)Drawbacks of using file systems (cont.) Atomicity of updatesFailures may leave database in an inconsistent state with partial updates carried outExample: Transfer of funds from one account to another should either complete or not happen at allConcu

7、rrent access by multiple usersConcurrent accessed needed for performanceUncontrolled concurrent accesses can lead to inconsistenciesExample: Two people reading a balance and updating it at the same timeSecurity problemsHard to provide user access to some, but not all, dataDatabase systems offer solu

8、tions to all the above problems5Levels of AbstractionPhysical level: describes how a record (e.g., customer) is stored.Logical level: describes data stored in database, and the relationships among the data.type customer = recordcustomer_id : string; customer_name : string;customer_street : string;cu

9、stomer_city : integer;end;View level: application programs hide details of data types. Views can also hide information (such as an employees salary) for security purposes. 6View of DataAn architecture for a database system 7Instances and SchemasSimilar to types and variables in programming languages

10、Schema 模式 the logical structure of the database Example: The database consists of information about a set of customers and accounts and the relationship between them.Analogous to type information of a variable in a programPhysical schema: database design at the physical levelLogical schema: database

11、 design at the logical levelInstance the actual content of the database at a particular point in time Analogous to the value of a variablePhysical Data Independence the ability to modify the physical schema without changing the logical schema (especially, application programs)Applications depend on

12、the logical schemaIn general, the interfaces between the various levels and components should be well defined so that changes in some parts do not seriously influence others.8Data ModelsA collection of tools for describing Data Data relationshipsData semanticsData constraintsRelational modelEntity-R

13、elationship data model (mainly for database design) Object-based data models (Object-oriented and Object-relational)Semistructured data model (XML)Other older models: used littleNetwork model Hierarchical model9Data Manipulation Language (DML)Language for accessing and manipulating the data organize

14、d by the appropriate data modelDML also known as query languageTwo classes of languages Procedural user specifies what data is required and how to get those data Declarative (nonprocedural) user specifies what data is required without specifying how to get those dataSQL is the most widely used query

15、 language10Data Definition Language (DDL)Specification notation for defining the database schemaExample:create table account ( account-number char(10), balance integer)DDL compiler generates a set of tables stored in a data dictionaryData dictionary contains metadata (i.e., data about data)Database

16、schema Data storage and definition language Specifies the storage structure and access methods usedIntegrity constraintsDomain constraintsReferential integrity (references constraint in SQL)AssertionsAuthorization 授權(quán)11Relational ModelExample of tabular data in the relational modelAttributes12A Sampl

17、e Relational Database13SQLSQL: widely used non-procedural languageExample: Find the name of the customer with customer-id 192-83-7465selectcustomer.customer_namefromcustomerwherecustomer.customer_id = 192-83-7465Example: Find the balances of all accounts held by the customer with customer-id 192-83-

18、7465selectaccount.balancefrom depositor, accountwhere depositor.customer_id = 192-83-7465 anddepositor.account_number = account.account_numberApplication programs generally access databases through one ofLanguage extensions to allow embedded SQLApplication program interface (e.g., ODBC/JDBC) which a

19、llow SQL queries to be sent to a database14Database DesignThe process of designing the general structure of the database:Logical Design Deciding on the database schema. Database design requires that we find a “good” collection of relation schemas.Business decision What attributes should we record in

20、 the database?Computer Science decision how to group these attributes to form the various tables?Physical Design Deciding on the physical layout of the database 15The Entity-Relationship ModelModels an enterprise as a collection of entities and relationshipsEntity: a “thing” or “object” in the enter

21、prise that is distinguishable from other objectsDescribed by a set of attributesRelationship: an association among several entitiesRepresented diagrammatically by an entity-relationship diagram:16Object-Relational Data ModelsExtend the relational data model by including object orientation and constr

22、ucts to deal with added data types.Allow attributes of tuples to have complex types, including non-atomic values such as nested relations.Preserve relational foundations, in particular the declarative access to data, while extending modeling power.Provide upward compatibility with existing relationa

23、l languages.17Semistructured Database Mode : Extensible Markup LanguageDefined by the WWW Consortium (W3C)Originally intended as a document markup language not a database languageThe ability to specify new tags, and to create nested tag structures made XML a great way to exchange data, not just docu

24、mentsXML has become the basis for all new generation data interchange formats.A wide variety of tools is available for parsing, browsing and querying XML documents/data18Storage ManagementStorage manager is a program module that provides the interface between the low-level data stored in the databas

25、e and the application programs and queries submitted to the system.The storage manager is responsible to the following tasks: Interaction with the file manager Efficient storing, retrieving and updating of dataIssues:Storage accessFile organizationIndexing and hashing19Query Processing1.Parsing and

26、translation2.Optimization3.Evaluation20Query Processing (Cont.)Alternative ways of evaluating a given queryEquivalent expressionsDifferent algorithms for each operationCost difference between a good and a bad way of evaluating a query can be enormousNeed to estimate the cost of operationsDepends cri

27、tically on statistical information about relations which the database must maintainNeed to estimate statistics for intermediate results to compute cost of complex expressions21Transaction ManagementA transaction is a collection of operations that performs a single logical function in a database appl

28、icationTransaction-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.Concurrency-control manager controls the interaction among the concurrent transactions, to en

29、sure the consistency of the database. 22Database ArchitectureThe architecture of a database systems is greatly influenced by the underlying computer system on which the database is running:CentralizedClient-serverParallel (multi-processor)Distributed 23Database UsersUsers are differentiated by the w

30、ay they expect to interact with the systemApplication programmers interact with system through DML callsSophisticated users 經(jīng)驗用戶 form requests in a database query languageSpecialized users 專業(yè)用戶 write specialized database applications that do not fit into the traditional data processing frameworkNave

31、 users 無經(jīng)驗用戶 invoke one of the permanent application programs that have been written previouslyExamples, people accessing database over the web, bank tellers, clerical staff24Database AdministratorCoordinates all the activities of the database system; the database administrator has a good understanding of the enterprises information resources and needs.Database administrators duties include:Schema definitionStorage structure and access method definitionSchema and physical organization modificationGranting user authority to access the databas

溫馨提示

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

評論

0/150

提交評論