数据库管理系统:ch01 Introduction_第1页
数据库管理系统:ch01 Introduction_第2页
数据库管理系统:ch01 Introduction_第3页
数据库管理系统:ch01 Introduction_第4页
数据库管理系统:ch01 Introduction_第5页
已阅读5页,还剩29页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论