• 0:00
    /
    0:00
    Loaded: 0%
    0:00
    Progress: 0%
    Stream TypeLIVE
    0:00
     
    1x
    Advertisement

Chapter 2 Database Archetecture Welcome to chapter 2.

Similar presentations


Presentation on theme: "Chapter 2 Database Archetecture Welcome to chapter 2."— Presentation transcript:

1 Chapter 2 Database Archetecture Welcome to chapter 2

2 2017/4/23 Chapter 2 Archetecture 2

3 The content 1).Database Users 2).Benifits of Database
3).History of database 4).Data Model, Schema 5). Three-Schema Architecture 6). Database Architecture Difficulty: Three-Schema Architecture Focus on: Three-Schema Architecture Hours:2 hours Teaching way: ppt

4 Database Users Database Designers: End-users:
They are responsible to define the content, the structure, the constraints, and functions or transactions in the database. They must communicate with the end-users and understand their needs. End-users: They use the data for queries, reports and some of them actually update the database content.

5 Database Administrator
Coordinates all the activities of the database system has a good understanding of the enterprise’s information resources and needs. Database administrator's duties include: Storage structure and access method definition Define the structure of the database Granting users authority to access the database Backing up data Monitoring performance and responding to changes

6 Database Administrator Duties
DBA Responsibilities Install and upgrade ORACLE server and applications Create primary database storage and primary objects Allocate system storage and plan future storage needs Modify the database structures Enroll and monitor user access to the database Back up and recover the database Maintain system Security Monitor and optimize performance DATABASE ADMINISTRATOR Startup and Shut Down the database Create Primary Storage Structures Backup and Recovery Understand the Oracle Architecture Enroll and Monitor Users Grant and Revoke Privileges Manage Database Design a Database

7 Benefits of Database Technology
Timetable Student Admin Scheduler Payroll Year List Cheques Students Course Data Lecturer Data DataBase Management System Database - Controlling redundancy in data storage and in development and maintenance efforts. - Sharing of data among multiple users. - Restricting unauthorized access to data. - Providing multiple interfaces to different classes of users. - Representing complex relationships among data. - Enforcing integrity constraints on the database. - Providing backup and recovery services. - Potential for enforcing standards. - Flexibility to change data structures. - Reduced application development time. - Availability of up-to-date information. Economies of scale.

8 History of Database Systems
1950s and early 1960s: Data processing using magnetic tapes for storage Tapes provide only sequential access Punched cards for input Late 1960s and 1970s: Hard disks allow direct access to data Network and hierarchical data models in widespread use After 1970 : Ted Codd defines the relational data model High-performance (for the era) transaction processing

9 Hierarchical Database Model
Logically represented by an upside down tree Each parent can have many children Each child has only one parent

10 Network Database Model
Each record can have multiple parents Composed of sets Each set has owner record and member record Member may have several owners Student dorm students Teaching group department teachers Storage structure: linked list, dual linked list

11 Relational Database Model
Storage structure: tables stored as files

12 History 1980s: Research relational prototypes evolve into commercial systems SQL becomes industry standard Parallel and distributed database systems Object-oriented database systems 1990s: Large decision support and data-mining applications Large multi-terabyte data warehouses Emergence of Web commerce 2000s: XML and XQuery standards Automated database administration Increasing use of highly parallel database systems Web-scale distributed data storage systems

13 Extending Database Capabilities
New functionality is being added to DBMSs in the following areas: Scientific Applications Image Storage and Management Audio and Video data management Data Mining Spatial data management Time Series and Historical Data Management The above gives rise to new research and development in incorporating new data types, complex data structures, new operations and storage and indexing schemes in database systems.

14 Data Models A collection of tools for describing
Data structure Data operation Data constraints Categories of data models: 1.Conceptual (high-level, semantic) data models: Provide concepts that are close to the way many users perceive data. Conceptual data models use concepts such as entities, attributes, and relationships. Entity-Relationship data model (mainly for database design) m 讲授 组成 成绩 选修 课程 班级 学生 管理 n 1 参考书 教师

15 Categories of data models
Physical (low-level, internal) data models: Provide concepts that describe details of how data is stored in the computer by representing information such as record formats, record orderings, and access paths. An access path is a structure that makes the search for particular database records efficient. Implementation (representational) data models: Provide concepts that fall between the above two, balancing user views with some computer storage details. The models used here are most frequently in traditional commercial DBMSs, and they include the widely-used relational data model, network and hierarchical ,Object-based data models (Object-oriented and Object-relational) 学生宿舍 学生 教研室 教师 Slide 2-15

16 Instances and Schemas (321,Jones,Owens)
Similar to types and variables in programming languages Schema – 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 program Instance – the actual content of the database at a particular point in time Analogous to the value of a variable Student(studno,name,address) Course(courseno,lecturer) Student(123,Bloggs,Woolton) (321,Jones,Owens)

17 Levels of Abstraction type customer = record
Physical 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 = record customer_id : string; customer_name : string; customer_street : string; customer_city : string; end; View level: application programs hide details of data types. Views can also hide information (such as an employee’s salary) for security purposes.

18 An architecture for a database system
View of Data An architecture for a database system

19 Three-Schema Architecture
Mappings among schema levels are needed to transform requests and data. Programs refer to an external schema, and are mapped by the DBMS to the internal schema for execution. Logical Data Independence: The capacity to change the conceptual schema without having to change the external schemas and their application programs. Physical Data Independence: The capacity to change the internal schema without having to change the conceptual schema. When a schema at a lower level is changed, only the mappings between this schema and higher-level schemas need to be changed in a DBMS that fully supports data independence. The higher-level schemas themselves are unchanged. Hence, the application programs need not be changed since they refer to the external schemas. Slide 2-19

20 Database Management System Internals
Storage management Query processing Transaction processing

21 Storage Management Storage 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. The storage manager is responsible to the following tasks: Interaction with the file manager Efficient storing, retrieving and updating of data Issues: Storage access File organization Indexing and hashing

22 Query Processing 1. Parsing and translation 2. Optimization
3. Evaluation

23 Transaction Management
A transaction is a collection of operations that performs a single logical function in a database application Transaction-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. Concurrency-control manager controls the interaction among the concurrent transactions, to ensure the consistency of the database.

24 Overall System Structure

25 DBMS Languages High Level or Non-procedural Languages: e.g., SQL, are set-oriented and specify what data to retrieve than how to retrieve. Also called declarative languages. Data Definition Language (DDL): Used by the DBA and database designers to specify the conceptual schema of a database. Data Manipulation Language (DML): Used to specify database retrievals and updates. Example: select age from student where name=‘Tom’ Slide 2-25

26

27 Database System Utilities
To perform certain functions such as: - Loading data stored in files into a database. - Backing up the database periodically on tape. - Reorganizing database file structures. - Report generation utilities. - Performance monitoring utilities. - Other functions, such as sorting , user monitoring , data compression , etc. Data dictionary / repository: - Used to store schema descriptions and other information such as design decisions, application program descriptions, user information, usage standards, etc. - Active data dictionary is accessed by DBMS software and users/DBA. - Passive data dictionary is accessed by users/DBA only.

28

29

30 DBMS Interfaces Stand-alone query language interfaces.
Programmer interfaces for embedding DML in programming languages: Pre-compiler Approach Procedure (Subroutine) Call Approach User-friendly interfaces: Menu-based, popular for browsing on the web Forms-based, designed for naïve users Graphics-based (Point and Click, Drag and Drop etc.) Natural language: requests in written English Combinations of the above Slide 2-30

31 Other DBMS Interfaces Speech as Input (?) and Output
Web Browser as an interface Parametric interfaces (e.g., bank tellers) using function keys. Interfaces for the DBA: Creating accounts, granting authorizations Setting system parameters Changing schemas or access path Slide 2-31

32 Database Architecture
The architecture of a database systems is greatly influenced by the underlying computer system on which the database is running: Centralized Client-server Parallel (multiple processors and disks) Distributed

33 A physical centralized architecture.

34 Logical two-tier client/server architecture.

35 Physical two-tier client-server architecture.

36 Logical three-tier client/server architecture.

37 Classification of DBMSs
Based on the data model used: - Traditional: Relational, Network, Hierarchical. Emerging: Object-oriented, Object-relational, Semi-structured Other classifications: - Single-user (typically used with micro- computers) vs. multi-user (most DBMSs). Centralized (uses a single computer with one database) vs. distributed (uses multiple computers, multiple databases) Distributed Database Systems have now come to be known as client server based database systems because they do not support a totally distributed environment, but rather a set of database servers supporting a set of clients.

38 Summary From this lecture you can learn : 1).Database Users
2).Benifits of Database 3).History of database 4).Data Model, Schema 5). Three-Schema Architecture

39 Any Questions? If there are any outstanding questions you can ask me one-to-one after the lecture OR privately in my office.

40 Exercises 1.what is three-schema architecture?


Download ppt "Chapter 2 Database Archetecture Welcome to chapter 2."

Similar presentations


Ads by Google