數(shù)據(jù)庫(kù)管理系統(tǒng):ch01 Introduction_第1頁(yè)
數(shù)據(jù)庫(kù)管理系統(tǒng):ch01 Introduction_第2頁(yè)
數(shù)據(jù)庫(kù)管理系統(tǒng):ch01 Introduction_第3頁(yè)
數(shù)據(jù)庫(kù)管理系統(tǒng):ch01 Introduction_第4頁(yè)
數(shù)據(jù)庫(kù)管理系統(tǒng):ch01 Introduction_第5頁(yè)
已閱讀5頁(yè),還剩29頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡(jiǎn)介

1、An Introduction to Database SystemChapter 1: IntroductionChapter 1: IntroductionDatabase-System ApplicationsPurpose of Database SystemsView of DataDatabase LanguagesRelational DatabasesDatabase DesignObject-based and semistructured databasesData Storage and QueryingTransaction ManagementDatabase Arc

2、hitectureDatabase Users and AdministratorsOverall StructureHistory of Database SystemsDatabase Management System (DBMS)DBMS provides an environment that is both convenient and efficient to use. It contains A collection of interrelated data, i.e. database which contains information about a particular

3、 enterpriseA set of programs to access the data Database Applications:Banking: all transactionsAirlines: reservations, schedulesUniversities: registration, gradesSales: customers, products, purchasesOnline retailers: order tracking, customized recommendationsManufacturing: production, inventory, ord

4、ers, supply chainHuman resources: employee records, salaries, tax deductionsDatabases touch all aspects of our livesPurpose 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 inconsis

5、tencyMultiple file formats, duplication of information in different filesDifficulty in accessing data Need to write a new program to carry out each new taskData isolation multiple files and formatsIntegrity problemsIntegrity constraints (e.g. account balance 0) become “buried” in program code rather

6、 than being stated explicitlyHard to add new constraints or change existing onesPurpose 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 acco

7、unt to another should either complete or not happen at allConcurrent 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 us

8、er access to some, but not all, dataDatabase systems offer solutions to all the above problemsLevels 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_i

9、d : string; customer_name : string;customer_street : string;customer_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. View of DataAn architecture for a database system Instances and Sc

10、hemasSimilar to types and variables in programming languagesSchema 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: data

11、base design at the physical levelLogical schema: database 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 schemaA

12、pplications depend on 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.Data ModelsA collection of tools for describing Data Data relationshipsData semanticsData constraintsRel

13、ational modelEntity-Relationship data model (mainly for database design) Object-based data models (Object-oriented and Object-relational)Semistructured data model (XML)Other older models:Network model Hierarchical modelThe Entity-Relationship ModelModels an enterprise as a collection of entities and

14、 relationshipsEntity: a “thing” or “object” in the enterprise that is distinguishable from other objectsDescribed by a set of attributesRelationship: an association among several entitiesRepresented diagrammatically by an entity-relationship diagram:Relational ModelExample of tabular data in the rel

15、ational modelAttributesA Sample Relational DatabaseDatabase LanguagesA database system provides a data definition language (DDL) to specify the database schema and a data manipulation language (DML) to express database queries and updates.Data Definition Language (DDL)Specification notation for defi

16、ning 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 schema IndexIntegrity constraintsDomain constraintsReferential integrity

17、 (references constraint in SQL)AssertionsAuthorizationData Manipulation Language (DML)Language for accessing and manipulating the data organized 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

18、data Declarative (nonprocedural) user specifies what data is required without specifying how to get those dataSQL is the most widely used query languageSQLSQL: widely used non-procedural languageExample: Find the name of the customer with customer-id 192-83-7465selectcustomer.customer_namefromcustom

19、erwherecustomer.customer_id = 192-83-7465Example: 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_numberApplication programs generall

20、y access databases through one ofLanguage extensions to allow embedded SQLApplication program interface (e.g., ODBC/JDBC) which allow SQL queries to be sent to a databaseObject-Relational Data ModelsExtend the relational data model by including object orientation and constructs to deal with added da

21、ta 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 relational languages.XML: Extensibl

22、e 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 documentsXML has become the basis for all new generation d

23、ata interchange formats.A wide variety of tools is available for parsing, browsing and querying XML documents/dataDatabase UsersUsers are differentiated by the way they expect to interact with the systemApplication programmers interact with system through DML callsSophisticated users form requests i

24、n a database query languageSpecialized users write specialized database applications that do not fit into the traditional data processing frameworkNave users invoke one of the permanent application programs that have been written previouslyExamples, people accessing database over the web, bank telle

25、rs, clerical staffDatabase 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 definition

26、Schema and physical organization modificationGranting user authority to access the databaseSpecifying integrity constraintsActing as liaison with usersMonitoring performance and responding to changes in requirementsDatabase ArchitectureThe architecture of a database systems is greatly influenced by

27、the underlying computer system on which the database is running:CentralizedClient-serverParallel (multi-processor)Distributed Storage ManagementStorage manager is a program module that provides the interface between the low-level data stored in the database and the application programs and queries s

28、ubmitted 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 hashingQuery Processing1.Parsing and translation2.Optimization3.EvaluationQuery Pro

29、cessing (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 critically on statistical information about relatio

30、ns which the database must maintainNeed to estimate statistics for intermediate results to compute cost of complex expressionsTransaction ManagementA transaction is a collection of operations that performs a single logical function in a database applicationTransaction-management component ensures th

31、at 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 ensure the consistency of the database. Overall Syst

32、em Structure History of Database Systems1950s and early 1960s:Data processing using magnetic tapes for storageTapes provide only sequential accessPunched 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

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝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ù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 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)論