1 / 27

Yunsheng Liu 2008.9

II. Fundamentals of. Database Systems. Yunsheng Liu 2008.9. 软件学院. (1). Data are (or believed to be) facts or ideas which result from the observation of physical phenomena. (2) . Data are symbols for information presentation

dore
Download Presentation

Yunsheng Liu 2008.9

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. II Fundamentals of Database Systems Yunsheng Liu 2008.9 软件学院

  2. (1). Data are (or believed to be) facts or ideas which result from the observation of physical phenomena. (2). Data are symbols for information presentation - It can be recorded, communicated and identified - The symbols can be different in styles  formats  media (3). Data describe attributes of entities, events and transactions. 2.1 Data and Their Representation 2.1.1 Data and Information 1. Data Yunsheng Liu-DBS

  3. 2.1.1 Data and Information 2. Information - Information is processed and refined data which is used in decision making. 3. Datavs.Information (1). Information is made up of two parts: data  context (2). Sometimes, they are exchangeable to use (3). Relations and differences 4. Knowledge Yunsheng Liu-DBS

  4. data(ideas) information context Knowledge data(factors) Causal relation 2.1.1 Data and Information Examples: “天气闷热潮湿的” “ 是而” “天 将下 雨 ” “如果则” “ 天气是闷热而潮湿的, 天将下雨” Yunsheng Liu-DBS

  5. 2.1.2 Data Representations - The use of a DBS is ultimately concerned with some real-word enterprise, and the data to be stored describes various aspects of this enterprise. 1. Three realms: • Real-world, • Data/information-world • Computer-world Yunsheng Liu-DBS

  6. Real World CP. World Info. World • Relationships among the three worlds Physical Phenomena Operating Understanding Strategies, Rules KNOW. Observing Extracting Relating INFOR. Representing DATA Expiaining Yunsheng Liu-DBS

  7. 2.1.2 Data Representations 2. Types vs. occurrences of data The Type of STDUDENT STUDENT An occurrence of STDUDENT • Entities - An entity is a thing/object in the RW which exists and is distinguishable from any others — objective or subjective Yunsheng Liu-DBS

  8.   1 : 1 1 : M M : N Dept# D-Name S-Name D-Name Phone C-Name 2.1.3 Relationships Between Data 1. Relationships between data items Represanting semantic dependencies between data items  Used to aggregate the related data items into entities  The types: Yunsheng Liu-DBS

  9. Student Class interaction grouping Course Student Student generalization /specification Graduate 2.1.3 Relationships Between Data 2. Relationships between record types Concept—representing semantic relations between two entity sets/classes  Purpose—modeling the relations among entity types  Semantic notions: e.g. … Yunsheng Liu-DBS

  10. 1 : 1  Student Bicycle 1 : M  Class Student M : N  Student Course 2.1.3 Relationships Between Data 3. Relationship types between record types - Defined by the numbers of record occurrences for each record type to appear in a rerlationship Yunsheng Liu-DBS

  11. 2.2 Data Views 2.2.1 Hierarchical Data Abstractions 1. Abstraction at physical level - Describing physical data structure while hiding storage device properties and operational details 2. Abstraction at conceptual/logical level - Describing total logical data structure while hiding physical structures and Implementation details 3. Abstraction at user level - Describing local logical data structures for various users while hiding total structure complexity and details Yunsheng Liu-DBS 幻灯片 16

  12. 2.2.2 Hierarchical Data Views - Various data structures observed by different kinds of users taking different stands on and with different viewpoints End-user views —I/O formats Applications views —local logical structures System view —total logical structure Storage view —storage structure Physical view —physically organizing structure on a storage device Yunsheng Liu-DBS 幻灯片 16

  13. Schema vs. instance Type vs. occurrence 2.2.3. Database Schemas • A formal specification of a database structures (design or plan) in the DDL of a DBMS Subschemas / External schema • A formal specification of a local logical structure of a DB used by a user/application • There are many subschemas for a DB Yunsheng Liu-DBS

  14. 2.2.3. Database Schemas Conceptual/Logical schema • Stored/Internal schema • A formal specification of a total logical structure of a entire DB. • A schema is an integration of all the subschemas. • Each subschema can be derived from the conceptual schema and permitted to have some differences • A formal specification of a total physical structure or file organization of an entire DB. Yunsheng Liu-DBS 幻灯片 16

  15. 2.2.4 Independencies of Data • Data independence means that a data specification is separated( independent) from its use( program). • There are two kinds of data independences: Physical data independence - The physical schema can be changed without altering the conceptual schema or redefining subschemas and in turn rewriting application programs Logical data independence - The conceptual schema can be modified without affecting application programs 幻灯片 16 Yunsheng Liu-DBS

  16. xyz… I/O view    User level Abstraction Subschema 1 Subschema 2 Subschema n Appli view    Logical Data Independency System view Conceptual level Abstraction Physical Data Independency Stored view physical level Abstraction Physical view Physical DB Database System Hierarchy Conceptual schema Stored schema 2.2 H-Abstrac 2.2.2 Hierarchical Data Views Yunsheng Liu-DBS 幻灯片 15

  17. 1. Model concept • A model is an abstract representation of a “system” in mathematics • Two basic types of models: structuraland procedural • Models are of abstractions at different levels 2. Data model concept • A DM is a model to describe (the data of ) a DB • Two kinds: DBS-oriented, e.g. HM, NM, RM, etc. Area-oriented, e.g. E-RM • Database DM vs. DB schema –– related & different 2.3 Introduction to Data Models Yunsheng Liu-DBS

  18. 2.3 Introduction to Data Models 3. Three classical data models Hierarchical model  Network model  Relational model 4. Semantic data models • E-R, the 1th SDM • Function model, Role model, Type model, etc. Yunsheng Liu-DBS

  19. 2.4 Database Languages Introduction • Syntax — language text • Processing — Compiler system • Two kinds of capabilities: • Algebraic operating—as a general programming language, • Accesses to a DB Yunsheng Liu-DBS

  20. 2.4 Database Languages 2. Data language DDL — Data definition/description language DML — Data manipulation language QL — Query language 3. DBCL — Database control language HL — Host Language, a programming language within which DML statements can be embedded Yunsheng Liu-DBS

  21. Application HL Compiler HL statements DML statements DML Pre-compiler  DBMS DBMS Program variables DB HL variables  Host variables 2.4 Database Languages 5. The language utilization Yunsheng Liu-DBS

  22. Type Occurrence Schema, Subschemas DB Entity type/set, Record type, File、Relation、Data set Relation schema Page, Block Entity, Record, Tuple Field, Attribute, Data item Value 2.5 Database Organization • Hierarchy of DB Organization Yunsheng Liu-DBS

  23. 2.6 Queries • The essential purpose to develop a DB is for conveniently utilizing the DB • Two kinds of operations: query and maintenance and a query is more complex than others • Query processing includes: • Q specification in QL  physical DB operations • Optimizations • Execution • It has a heavy influence on the performance of the system Yunsheng Liu-DBS

  24. 2.7 Transaction Management • - Transaction Management is the core and key issue • of a DBS • Admission • Resource management: CPU, I/O and buffer, data • Consistency maintenance • Execution control • Recovery management Yunsheng Liu-DBS

  25. Supporting for 2.8 Database Users • User types • End-users • Occasional • Repeat-based • IP professionals • Operators • Application programmers • Database Administrators/Developer • System programmers Yunsheng Liu-DBS

  26. End-user Operator App-pmer DBA Sys-admer Sys-pmer The Relationships among users Yunsheng Liu-DBS

  27. Users Users 1 Users 2 DBA/D DBMS Applications (DML+HL) Interfaces Schemas Queries Compiling Q Processing DDL Interpreting L Processing Transaction Processing Data processing Data Manipulating Stored Data Mgt. Data mgt. DD/D Mgt. DB DD/D OS DBs Data files Indexes 2.9 Database System Architecture Yunsheng Liu-DBS

More Related