高级数据库系统第一章简介.ppt
《高级数据库系统第一章简介.ppt》由会员分享,可在线阅读,更多相关《高级数据库系统第一章简介.ppt(34页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、Database System Concepts,5th Ed.Silberschatz,Korth and SudarshanSee www.db- for conditions on re-use Chapter 1:IntroductionSilberschatz,Korth and Sudarshan1.2Database System Concepts-5th Edition,May 23,2005Chapter 1:IntroductionnPurpose of Database SystemsnDatabase LanguagesnRelational DatabasesnDat
2、abase DesignnData ModelsnDatabase InternalsnDatabase Users and AdministratorsnOverall StructurenHistory of Database SystemsSilberschatz,Korth and Sudarshan1.3Database System Concepts-5th Edition,May 23,2005Database Management System(DBMS)nDBMS contains information about a particular enterpriselColle
3、ction of interrelated datalSet of programs to access the data lAn environment that is both convenient and efficient to usenDatabase Applications:lBanking:all transactionslAirlines:reservations,scheduleslUniversities:registration,gradeslSales:customers,products,purchaseslOnline retailers:order tracki
4、ng,customized recommendationslManufacturing:production,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,2005Purpose of Database SystemsnIn the
5、early days,database applications were built directly on top of file 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
6、 new tasklData isolation multiple files and formatslIntegrity problems4Integrity 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 Edi
7、tion,May 23,2005Purpose of Database Systems(Cont.)nDrawbacks of using file systems(cont.)lAtomicity 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 alllConcu
8、rrent access by multiple users4Concurrent accessed needed for performance4Uncontrolled concurrent accesses can lead to inconsistenciesExample: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 so
9、lutions to all the above problemsSilberschatz,Korth and Sudarshan1.6Database System Concepts-5th Edition,May 23,2005Levels of AbstractionnPhysical 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=
10、recordcustomer_id:string;customer_name:string;customer_street:string;customer_city:string;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
11、Edition,May 23,2005View of DataAn architecture for a database system Silberschatz,Korth and Sudarshan1.8Database System Concepts-5th Edition,May 23,2005Instances and SchemasnSimilar to types and variables in programming languagesnSchema the logical structure of the database lExample:The database con
12、sists of information about a set of customers and accounts and the relationship between them)lAnalogous 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
13、 at a particular point in time lAnalogous to the value of a variablenPhysical Data Independence the 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 d
14、efined so that changes in some parts do not seriously influence others.Silberschatz,Korth and Sudarshan1.9Database System Concepts-5th Edition,May 23,2005Data ModelsnA collection of tools for describing lData lData relationshipslData semanticslData constraintsnRelational modelnEntity-Relationship da
15、ta model(mainly for database design)nObject-based data models(Object-oriented and Object-relational)nSemistructured data model (XML)nOther older models:lNetwork model lHierarchical modelSilberschatz,Korth and Sudarshan1.10Database System Concepts-5th Edition,May 23,2005Data Manipulation Language(DML
16、)nLanguage 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 without spec
17、ifying how to get those datanSQL is the most widely used query languageSilberschatz,Korth and Sudarshan1.11Database System Concepts-5th Edition,May 23,2005Data Definition Language(DDL)nSpecification notation for defining the database schemaExample:create table account(account_number char(10),branch_
18、name char(10),balance integer)nDDL compiler generates a set of tables stored in a data dictionarynData dictionary contains metadata(i.e.,data about data)lDatabase schema lData storage and definition language 4Specifies the storage structure and access methods usedlIntegrity constraints4Domain constr
19、aints4Referential integrity(e.g.branch_name must correspond to a valid branch in the branch table)lAuthorizationSilberschatz,Korth and Sudarshan1.12Database System Concepts-5th Edition,May 23,2005Relational ModelnExample of tabular data in the relational modelAttributesSilberschatz,Korth and Sudarsh
20、an1.13Database System Concepts-5th Edition,May 23,2005A Sample Relational DatabaseSilberschatz,Korth and Sudarshan1.14Database System Concepts-5th Edition,May 23,2005SQLnSQL:widely used non-procedural languagelExample:Find the name of the customer with customer-id 192-83-7465selectcustomer.customer_
21、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_numbernApplication programs
22、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.15Database System Concepts-5th Edition,May 23,2005Database DesignThe process of designing
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 高级 数据库 系统 第一章 简介
限制150内