Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 2 Database Environment Chuan Li 1 © Pearson Education Limited 1995, 2005.

Similar presentations


Presentation on theme: "Chapter 2 Database Environment Chuan Li 1 © Pearson Education Limited 1995, 2005."— Presentation transcript:

1 Chapter 2 Database Environment Chuan Li 1 © Pearson Education Limited 1995, 2005

2 Chapter 2 - Objectives  Purpose of three-level database architecture.  Contents of external, conceptual, and internal levels.  Purpose of external/conceptual and conceptual/internal mappings.  Meaning of logical and physical data independence.  Distinction between DDL and DML.  A classification of data models. 2 © Pearson Education Limited 1995, 2005

3 Chapter 2 - Objectives  Purpose/importance of conceptual modeling.  Typical functions and services a DBMS should provide.  Function and importance of system catalog.  Software components of a DBMS.  Meaning of client–server architecture and advantages of this type of architecture for a DBMS.  Function and uses of Transaction Processing Monitors. 3 © Pearson Education Limited 1995, 2005

4 Chapter 2 - Objectives  Purpose of three-level database architecture.  Contents of external, conceptual, and internal levels.  Purpose of external/conceptual and conceptual/internal mappings.  Meaning of logical and physical data independence.  Distinction between DDL and DML.  A classification of data models. 4 © Pearson Education Limited 1995, 2005

5 Objectives of Three-Level Architecture  All users should be able to access same data.  A user’s view is immune to changes made in other views.  Users should not need to know physical database storage details. 5 © Pearson Education Limited 1995, 2005

6 Objectives of Three-Level Architecture  All users should be able to access same data.  A user’s view is immune to changes made in other views.  Users should not need to know physical database storage details. 6 © Pearson Education Limited 1995, 2005

7 Objectives of Three-Level Architecture  All users should be able to access same data.  A user’s view is immune to changes made in other views.  Users should not need to know physical database storage details. 7 © Pearson Education Limited 1995, 2005

8 Objectives of Three-Level Architecture  DBA should be able to change database storage structures without affecting the users’ views.  Internal structure of database should be unaffected by changes to physical aspects of storage.  DBA should be able to change conceptual structure of database without affecting all users. 8 © Pearson Education Limited 1995, 2005

9 Objectives of Three-Level Architecture  DBA should be able to change database storage structures without affecting the users’ views.  Internal structure of database should be unaffected by changes to physical aspects of storage.  DBA should be able to change conceptual structure of database without affecting all users. 9 © Pearson Education Limited 1995, 2005

10 Objectives of Three-Level Architecture  DBA should be able to change database storage structures without affecting the users’ views.  Internal structure of database should be unaffected by changes to physical aspects of storage.  DBA should be able to change conceptual structure of database without affecting all users. 10 © Pearson Education Limited 1995, 2005

11 Chapter 2 - Objectives  Purpose of three-level database architecture.  Contents of external, conceptual, and internal levels.  Purpose of external/conceptual and conceptual/internal mappings.  Meaning of logical and physical data independence.  Distinction between DDL and DML.  A classification of data models. 11 © Pearson Education Limited 1995, 2005

12 ANSI-SPARC Three-Level Architecture 12 © Pearson Education Limited 1995, 2005 We need to get familiarized with such organizations… Very important American National Standard Institute on System Planning and Requirement Committee

13 ANSI-SPARC Three-Level Architecture 13 © Pearson Education Limited 1995, 2005 3-level Design intends to offer More flexibility and more usability E.g, why we need a representative for DB class? The same is true… Divide and conquer in system design

14 ANSI-SPARC Three-Level Architecture  External Level  Users’ view of the database.  Describes that part of database that is relevant to a particular user.  Conceptual Level  Community view of the database.  Describes what data is stored in database and relationships among the data. 14 © Pearson Education Limited 1995, 2005 Describes what is concerned by the users, Which is usually part of logical schema… E.g, in the student – course scenario. Student manager wants to see student, while Course manager wants to see course…

15 ANSI-SPARC Three-Level Architecture  External Level  Users’ view of the database.  Describes that part of database that is relevant to a particular user.  Conceptual Level  Community view of the database.  Describes what data is stored in database and relationships among the data. 15 © Pearson Education Limited 1995, 2005 Describes the overall situation of what data is like… which is common to all users or applications in logical level … E.g, in the student – course scenario. The student, course, and student-course tables schema remains the same to all managers or users no matter what they want individually…

16 ANSI-SPARC Three-Level Architecture  Internal Level  Physical representation of the database on the computer.  Describes how the data is stored in the database. 16 © Pearson Education Limited 1995, 2005 Describes how data is stored or represented in DB… which is schema or description in physical level … E.g, in the student – course scenario. The student table is indexed with clustering … while course, and student- course tables uses unique index,…

17 Differences between Three Levels of ANSI-SPARC Architecture 17 © Pearson Education Limited 1995, 2005 Let’s see another scenario…

18 Differences between Three Levels of ANSI-SPARC Architecture 18 © Pearson Education Limited 1995, 2005 Here, User1 wants to see the information about staff… Staff No. Staff name Staff age Staff salary External view1 extracts them…

19 Differences between Three Levels of ANSI-SPARC Architecture 19 © Pearson Education Limited 1995, 2005 Here, User2 wants to see the information about staff-branch relationship… Which staff works in which branch… External view2 extracts them…

20 Differences between Three Levels of ANSI-SPARC Architecture 20 © Pearson Education Limited 1995, 2005 We come to conceptual level and notice that it contains all the information needed and remains the same to all users… Information about staff, and their branch No. … Requires very careful design…

21 Differences between Three Levels of ANSI-SPARC Architecture 21 © Pearson Education Limited 1995, 2005 When we move on to internal level we notice it talks a lot in physical structure, like pointers, indexes types applied, etc. Description about how data is stored … while still notices that it is only description also logically existence…

22 Chapter 2 - Objectives  Purpose of three-level database architecture.  Contents of external, conceptual, and internal levels.  Purpose of external/conceptual and conceptual/internal mappings.  Meaning of logical and physical data independence.  Distinction between DDL and DML.  A classification of data models. 22 © Pearson Education Limited 1995, 2005 More importantly, let’s see the mappings between them…

23 Data Independence and the ANSI- SPARC Three-Level Architecture 23 © Pearson Education Limited 1995, 2005 There are two kinds of inter-level mappings… external/conceptual mapping… and conceptual/internal mapping… They all serve to particular kind of data independence…

24 Differences between Three Levels of ANSI-SPARC Architecture 24 © Pearson Education Limited 1995, 2005 When the conceptual level changes… Let’s say, we adds attribute ‘data of employment’… should the external view remain unchanged?

25 Differences between Three Levels of ANSI-SPARC Architecture 25 © Pearson Education Limited 1995, 2005 Yes, it can, however, we have to change the external/conceptual mapping a bit… In order to screen the conceptual level changes Therefore, the external view remain unchanged, so are the applications working on it… Logical data independence

26 Differences between Three Levels of ANSI-SPARC Architecture 26 © Pearson Education Limited 1995, 2005 When the internal level changes… Let’s say, we reorganizes staff table in sequential files, not linked files, like now… should the external view remain unchanged?

27 Differences between Three Levels of ANSI-SPARC Architecture 27 © Pearson Education Limited 1995, 2005 Yes, it can, however, we have to change the conceptual/internal mapping a bit… In order to screen the internal level changes Therefore, the external view remain unchanged, so are the applications working on it… Physical data independence

28 Chapter 2 - Objectives  Purpose of three-level database architecture.  Contents of external, conceptual, and internal levels.  Purpose of external/conceptual and conceptual/internal mappings.  Meaning of logical and physical data independence.  Distinction between DDL and DML.  A classification of data models. 28 © Pearson Education Limited 1995, 2005 Now, let’s see the formal meaning of logical and physical data independence…

29 Data Independence  Logical Data Independence  Refers to immunity of external schemas to changes in conceptual schema.  Conceptual schema changes (e.g. addition/removal of entities).  Should not require changes to external schema or rewrites of application programs. 29 © Pearson Education Limited 1995, 2005 Simply put, external schema is independent to conceptual schema…

30 Data Independence  Physical Data Independence  Refers to immunity of conceptual schema to changes in the internal schema.  Internal schema changes (e.g. using different file organizations, storage structures/devices).  Should not require change to conceptual or external schemas. 30 © Pearson Education Limited 1995, 2005 Simply put, external schema is independent to internal schema…

31 Chapter 2 - Objectives  Purpose of three-level database architecture.  Contents of external, conceptual, and internal levels.  Purpose of external/conceptual and conceptual/internal mappings.  Meaning of logical and physical data independence.  Distinction between DDL and DML.  A classification of data models. 31 © Pearson Education Limited 1995, 2005 We have covered DB architecture and operations… They are defined in different ways… DDL and DML Now, let’s see the difference…

32 Database Languages  Data Definition Language (DDL)  Allows the DBA or user to describe and name entities, attributes, and relationships required for the application  plus any associated integrity and security constraints. 32 © Pearson Education Limited 1995, 2005 DDL is the tool to define the data world in DB scope… Technically, you can define schema, DB, table, attribute, domain, constraints, index, …

33 Database Languages  Data Manipulation Language (DML)  Provides basic data manipulation operations on data held in the database. 33 © Pearson Education Limited 1995, 2005 DML is the tool to operate the data world in DB scope… Technically, you can define schema, DB, table, attribute, domain, constraints, index, …

34 Chapter 2 - Objectives  Purpose of three-level database architecture.  Contents of external, conceptual, and internal levels.  Purpose of external/conceptual and conceptual/internal mappings.  Meaning of logical and physical data independence.  Distinction between DDL and DML.  A classification of data models. 34 © Pearson Education Limited 1995, 2005 Databases are built on top of certain data models. Now, let’s see about it…

35 Data Model  Purpose  To represent data in an understandable way.  The most important data models include:  Relational Model  Hierarchical Model  Network Model  Data Model comprises:  a structural part;  a manipulative part;  possibly a set of integrity rules 35 © Pearson Education Limited 1995, 2005 Data Model is the abstracted description of realistic things… Data Model capture the key attributes of the objective things…

36 Data Model  Purpose  To represent data in an understandable way.  The most important data models include:  Relational Model  Hierarchical Model  Network Model  Data Model comprises:  a structural part;  a manipulative part;  possibly a set of integrity rules 36 © Pearson Education Limited 1995, 2005 Relational Model has been the most influential model for the last decades…

37 Data Model  Purpose  To represent data in an understandable way.  The most important data models include:  Relational Model  Hierarchical Model  Network Model  Data Model comprises:  a structural part;  a manipulative part;  possibly a set of integrity rules 37 © Pearson Education Limited 1995, 2005 Data structure, Data manipulation, and Data integrity…

38 Relational Data Model 38 © Pearson Education Limited 1995, 2005 All entities and relationships are represented as relations… Staff, Branch, …

39 Network Data Model 39 © Pearson Education Limited 1995, 2005 Network structure Entities information are represented as record set, and Relationships as basic level connections… Certain branch has certain staffs…

40 Hierarchical Data Model 40 © Pearson Education Limited 1995, 2005 Tree-like structure Entities information are represented as record set, and Relationships as basic level connections… Certain branch has certain staffs…

41 Chapter 2 - Objectives  Purpose/importance of conceptual modeling.  Typical functions and services a DBMS should provide.  Function and importance of system catalog.  Software components of a DBMS.  Meaning of client–server architecture and advantages of this type of architecture for a DBMS.  Function and uses of Transaction Processing Monitors. 41 © Pearson Education Limited 1995, 2005 Conceptual modeling, logical modeling and physical modeling. Now, let’s see why it’s important…

42 Conceptual Modeling  Conceptual schema is the core of a system supporting all user views.  Should be complete and accurate representation of an organization’s data requirements.  Conceptual modeling is process of developing a model of information use that is independent of implementation details.  Result is a conceptual data model. 42 © Pearson Education Limited 1995, 2005 Conceptual level is the core level in 3 levels architecture… And it’s the overall logical view of the entire organization

43 Conceptual Modeling  Conceptual schema is the core of a system supporting all user views.  Should be complete and accurate representation of an organization’s data requirements.  Conceptual modeling is process of developing a model of information use that is independent of implementation details.  Result is a conceptual data model. 43 © Pearson Education Limited 1995, 2005 It’s the ultimate shared source of all users! So it should be clean and complete

44 Conceptual Modeling  Conceptual schema is the core of a system supporting all user views.  Should be complete and accurate representation of an organization’s data requirements.  Conceptual modeling is process of developing a model of information use that is independent of implementation details.  Result is a conceptual data model. 44 © Pearson Education Limited 1995, 2005 It should provide easy translation to implementation and understanding

45 Conceptual Modeling  Conceptual schema is the core of a system supporting all user views.  Should be complete and accurate representation of an organization’s data requirements.  Conceptual modeling is process of developing a model of information use that is independent of implementation details.  Result is a conceptual data model. 45 © Pearson Education Limited 1995, 2005

46 Chapter 2 - Objectives  Purpose/importance of conceptual modeling.  Typical functions and services a DBMS should provide.  Function and importance of system catalog.  Software components of a DBMS.  Meaning of client–server architecture and advantages of this type of architecture for a DBMS.  Function and uses of Transaction Processing Monitors. 46 © Pearson Education Limited 1995, 2005 What DBMS must do or provide, let’s see about it…

47 Functions of a DBMS  Data Storage, Retrieval, and Update.  A User-Accessible Catalog.  Transaction Support.  Concurrency Control Services.  Recovery Services. 47 © Pearson Education Limited 1995, 2005

48 Functions of a DBMS  Data Storage, Retrieval, and Update.  A User-Accessible Catalog.  Transaction Support.  Concurrency Control Services.  Recovery Services. 48 © Pearson Education Limited 1995, 2005

49 Functions of a DBMS  Data Storage, Retrieval, and Update.  A User-Accessible Catalog.  Transaction Support.  Concurrency Control Services.  Recovery Services. 49 © Pearson Education Limited 1995, 2005

50 Functions of a DBMS  Data Storage, Retrieval, and Update.  A User-Accessible Catalog.  Transaction Support.  Concurrency Control Services.  Recovery Services. 50 © Pearson Education Limited 1995, 2005

51 Functions of a DBMS  Data Storage, Retrieval, and Update.  A User-Accessible Catalog.  Transaction Support.  Concurrency Control Services.  Recovery Services. 51 © Pearson Education Limited 1995, 2005

52 Functions of a DBMS  Authorization Services.  Support for Data Communication.  Integrity Services.  Services to Promote Data Independence.  Utility Services. 52 © Pearson Education Limited 1995, 2005

53 Functions of a DBMS  Authorization Services.  Support for Data Communication.  Integrity Services.  Services to Promote Data Independence.  Utility Services. 53 © Pearson Education Limited 1995, 2005

54 Functions of a DBMS  Authorization Services.  Support for Data Communication.  Integrity Services.  Services to Promote Data Independence.  Utility Services. 54 © Pearson Education Limited 1995, 2005

55 Functions of a DBMS  Authorization Services.  Support for Data Communication.  Integrity Services.  Services to Promote Data Independence.  Utility Services. 55 © Pearson Education Limited 1995, 2005

56 Functions of a DBMS  Authorization Services.  Support for Data Communication.  Integrity Services.  Services to Promote Data Independence.  Utility Services. 56 © Pearson Education Limited 1995, 2005

57 Chapter 2 - Objectives  Purpose/importance of conceptual modeling.  Typical functions and services a DBMS should provide.  Function and importance of system catalog.  Software components of a DBMS.  Meaning of client–server architecture and advantages of this type of architecture for a DBMS.  Function and uses of Transaction Processing Monitors. 57 © Pearson Education Limited 1995, 2005 What is system catalog, let’s see about it…

58 System Catalog  Repository of information (metadata) describing the data in the database.  Typically stores:  names, types, and sizes of data items;  constraints on the data;  names of authorized users;  data items accessible by a user and the type of access;  usage statistics. 58 © Pearson Education Limited 1995, 2005 One of the fundamental components of DBMS Data about data… data type… data structure… data integrity… data security… data usability…

59 Chapter 2 - Objectives  Purpose/importance of conceptual modeling.  Typical functions and services a DBMS should provide.  Function and importance of system catalog.  Software components of a DBMS.  Meaning of client–server architecture and advantages of this type of architecture for a DBMS.  Function and uses of Transaction Processing Monitors. 59 © Pearson Education Limited 1995, 2005 What tools are embedded with DBMS, let’s see about it…

60 Components of a DBMS 60 © Pearson Education Limited 1995, 2005 Mainly composed of … DML processor QL processor DDL processor Database manager Other components…

61 Components of Database Manager (DM) 61 © Pearson Education Limited 1995, 2005 Database manager is the most complex part… Security, concurrency, recovery, integrity, optimization,…

62 Chapter 2 - Objectives  Purpose/importance of conceptual modeling.  Typical functions and services a DBMS should provide.  Function and importance of system catalog.  Software components of a DBMS.  Meaning of client–server architecture and advantages of this type of architecture for a DBMS.  Function and uses of Transaction Processing Monitors. 62 © Pearson Education Limited 1995, 2005 C/S sounds familiar, right? let’s see about it…

63 Multi-User DBMS Architectures  Teleprocessing  File-server  Client-server 63 © Pearson Education Limited 1995, 2005 The incipient stage… Terminals are connected to DB via wires They are not independent…

64 Multi-User DBMS Architectures  Teleprocessing  File-server  Client-server 64 © Pearson Education Limited 1995, 2005 The intermediate stage… Workstations are auto and isolated systems work with DB via LANs File-based sharing…

65 Multi-User DBMS Architectures  Teleprocessing  File-server  Client-server 65 © Pearson Education Limited 1995, 2005 The sophisticated stage… Clients are auto and isolated systems running only applications… Communicating with DB via Internet…

66 Teleprocessing  Traditional architecture. 66 © Pearson Education Limited 1995, 2005 Single mainframe with a number of terminals attached…

67 File-Server Architecture 67 © Pearson Education Limited 1995, 2005 Single mainframe with a number of terminals attached…

68 Traditional Two-Tier Client- Server  Client (tier 1) manages user interface and runs applications.  Server (tier 2) holds database and DBMS.  Advantages include:  wider access to existing databases;  increased performance;  possible reduction in hardware costs;  reduction in communication costs;  increased consistency. 68 © Pearson Education Limited 1995, 2005

69 Traditional Two-Tier Client- Server 69 © Pearson Education Limited 1995, 2005 Significant network traffic. Copy of DBMS on each workstation. Concurrency, recovery and integrity control more complex…

70 Traditional Two-Tier Client- Server 70 © Pearson Education Limited 1995, 2005 wider access to existing databases, and increased performance possible reduction in hardware costs, and reduction in communication costs, increased consistency…

71 Chapter 2 - Objectives  Purpose/importance of conceptual modeling.  Typical functions and services a DBMS should provide.  Function and importance of system catalog.  Software components of a DBMS.  Meaning of client–server architecture and advantages of this type of architecture for a DBMS.  Function and uses of Transaction Processing Monitors. 71 © Pearson Education Limited 1995, 2005 You have got to know about it…

72 Transaction Processing Monitors  Program that controls data transfer between clients and servers in order to provide a consistent environment, particularly for Online Transaction Processing (OLTP). 72 © Pearson Education Limited 1995, 2005

73 TPM as middle tier of 3-tier client-server 73 © Pearson Education Limited 1995, 2005

74 Homework  Review Questions  2.3, 2.4, 2.6, 2.7 74

75 Homework  Review Questions  2.3, 2.4, 2.6, 2.7 75

76 2015-11-23 Advanced Topics in Database Technologies 76 Thank you !!!


Download ppt "Chapter 2 Database Environment Chuan Li 1 © Pearson Education Limited 1995, 2005."

Similar presentations


Ads by Google