【正文】
ability. DBMSs provide high reliability ? Enforcing integrity constraints 完整性約束 ? Integrity constraints reflect the meaning (or, the semantics) of the data and of the application ? Ensuring data consistency despite hardware or software failures. 數(shù)據(jù)一致性 ? Tansactions Within an application program, one or more queryandupdate requests to the DBMS can be logically grouped together in order to perform a task. A group of such requests is called a transaction. 事務(wù) ? Examples: a customer pays with a credit card, withdraw money from ATM TCGCSU Database Systems Characteristics of the Database Approach 4 ? Efficiency: DBMSs support both efficient space utilization and efficient access to data. ? Storing each data item only once 減少冗余 ? Enhancing the performance of queries by means of optimizations and the use of access methods to data based on their values 查詢(xún)優(yōu)化 ? Decreasing response time of transactions by allowing multiple users to access the database concurrently 并發(fā)提高效率 TCGCSU Database Systems Contrasting Database and File Systems TCGCSU Database Systems File1 File2 Filen Prog1 Prog2 Progn File System TCGCSU Database Systems Database Prog1 Prog2 Progn DBMS TCGCSU Database Systems 人工管理 文件系統(tǒng) 數(shù)據(jù)庫(kù)系統(tǒng) 應(yīng)用背景 科學(xué)計(jì)算 科學(xué)計(jì)算、管理 大規(guī)模管理 硬件背景 無(wú)直接存取存儲(chǔ)設(shè)備 磁盤(pán)、磁鼓 大容量磁盤(pán) 軟件背景 沒(méi)有操作系統(tǒng) 有文件系統(tǒng) 有數(shù)據(jù)庫(kù)管理系統(tǒng) 背 景 處理方式 批處理 聯(lián)機(jī)實(shí)時(shí)處理 批處理 聯(lián)機(jī)實(shí)時(shí)處理 , 分布處理批處理 數(shù)據(jù)的管理者 人 文件系統(tǒng) 數(shù)據(jù)庫(kù)管理系統(tǒng) 數(shù)據(jù)面向的對(duì)象 某一應(yīng)用程序 某一應(yīng)用程序 整個(gè)應(yīng)用系統(tǒng) 數(shù)據(jù)的共享程度 無(wú)共享 , 冗余度極大 共享性差 , 冗余度大 共享性高,冗余度小 數(shù)據(jù)的 獨(dú)立性 不獨(dú)立,完全依賴(lài)于程序 獨(dú)立性差 具有高度的物理獨(dú)立性和邏輯獨(dú)立性 數(shù)據(jù)的結(jié)構(gòu)化 無(wú)結(jié)構(gòu) 記錄內(nèi)有結(jié)構(gòu),整體無(wú)結(jié)構(gòu) 整體結(jié)構(gòu)化,用數(shù)據(jù)模型描述 特 點(diǎn) 數(shù)據(jù)控制能力 應(yīng)用程序自己控制 應(yīng)用程序自己控制 由數(shù)據(jù)庫(kù)管理系統(tǒng)提供數(shù)據(jù)安全性、完整性、并發(fā)控制和恢復(fù)能力 Compare the different phases of data management (Table1) TCGCSU Database Systems When Is a Database Management System Needed? ? Advantages 1 ? Control of data redundancy ? Data consistency ? More information from the same amount of data ? Sharing of data ? Improved data integrity ? Improved security ? Enforcement of standards ? Economy of scale TCGCSU Database Systems ? Advantages 2 ? Balance of conflicting requirements ? Improved data accessibility and responsiveness ? Increased productivity ? Improved maintenance through data independence ? Increased concurrency ? Improved backup and recovery services TCGCSU Database Systems ? Disadvantages ? Complexity ? Size ? Cost of DBMSs ? Additional hardware costs ? Cost of conversion ? Performance ? Higher impact of a failure TCGCSU Database Systems When Is a Database Management System Not Needed? ? The data has a simple structure and its size is small. ? The application, although simple and unchanging, has a special purpose. ? Concurrent access to data by multiple users is not required. TCGCSU Database Systems Four Concepts ? Data ? Database ? DBMS( Database Management Systems ) ? DBS (Database Systems ) TCGCSU Database Systems ? Database Systems ? Concepts ? Data(數(shù)據(jù) ): ? Data are raw facts that describe people, objects, and events. Or 數(shù)據(jù)實(shí)際上就是描述事物的符號(hào)記錄。 Algorithms 數(shù)據(jù)庫(kù)的地位 TCGCSU Database Systems Topics Shall be Learned ? Introduction ? Relational Model ? SQL ? EntityRelationship Model ? RelationalDatabase Design ? Transactions ? Concurrency Control ? Recovery System ( Integrity and Security) ? Database System Architectures ? …… TCGCSU Database Systems Chapter 1: Introduction ? Purpose of Database Systems ? View of Data ? Database Languages ? Relational Databases ? Database Design ? Objectbased and semistructured databases ? Data Storage and Querying ? Transaction Management ? Database Architecture ? Database Users and Administrators ? Overall Structure ? History of Database Systems TCGCSU Database Systems Database Management System (DBMS) ? DBMS contains information about a particular enterprise ? Collection of interrelated data ? Set of programs to access the data ? An environment that is both convenient and efficient to use ? Database Applications? ? Banking: all transactions ? Airlines: reservations, schedules ? Universities: registration, grades ? Sales: customers, products, purchases ? Online retailers: order tracking, customized remendations ? Manufacturing: production, inventory, orders, supply chain ? Human resources: employee records, salaries, tax deductions ? Databases touch all aspects of our lives TCGCSU Database Systems The Examples of Database Systems ? Purchases using your credit card 信用卡 ? A credit card database ? The checkout assistant ? A credit card reader ? Check your credit ? Add the purchases to database ? Monthly statements to each cardholder TCGCSU Database Systems Purpose of Database Systems ? In the early days, database applications were built directly on top of file systems ? Drawbacks of using file systems to store data? TCGCSU Database Systems ? Limitations of the FileBased Approach ? Data redundancy and inconsistency數(shù)據(jù)冗余與非一致性 ? Multiple file formats, duplication of information in different files ? 文件格式不相容, 數(shù)據(jù)冗余 ? Programdata dependence 程序依賴(lài)于數(shù)據(jù) ? Need to write a new program to carry out each new task ? Data isolation — multiple files and formats ? 數(shù)據(jù)孤立;文件格式不相容 ? Integrity problems完整性問(wèn)題 ? Integrity constraints (. account balance 0) bee ―buried‖ in program code rather than being stated explicitly ? Hard to add new constraints or change existing ones Traditional FileBased Systems 文件系統(tǒng) TCGCSU Database Systems ? Drawbacks of using file systems (cont.) ? Atomicity of updates原子更新 ? Failures may leave database in an inconsistent state with partial updates carried out ? Example: Transfer of funds from one account to ano