Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 1 Introduction to Databases. 1-2 Chapter Outline   Common uses of database systems   Meaning of basic terms   Database Applications  

Similar presentations


Presentation on theme: "Chapter 1 Introduction to Databases. 1-2 Chapter Outline   Common uses of database systems   Meaning of basic terms   Database Applications  "— Presentation transcript:

1 Chapter 1 Introduction to Databases

2 1-2 Chapter Outline   Common uses of database systems   Meaning of basic terms   Database Applications   Database (D/B)   Database Management System (DBMS)   Major components of the DBMS environment   Typical functions of DBMS

3 1-3 An Example Of Database Applications   Checkout of purchasing goods from a supermarket   Use bar code to find the price of each purchase item from product database   Reduce the number of each purchase item in stock   Summarize and display the total price   Re-order an item if its number < its safety threshold   Purchase checkout using your credit card   Check if the card is in OK status from card database   Check if sufficient credit left   Authorize the purchase

4 1-4 Database Applications   At the center of these application examples is the database.   For the compter system to support the applications that the end-users want, it requires a suitably structured database.   The process producing this structure : database design.   A well-designed database will allow you to produce a system that satisfies the requirements of the users and provides acceptable performance.

5 1-5 1.0 Overview Database application systems Sales Tables Typical Architecture of DB Applications

6 1-6 Terminology Database   A shared collection of logically related data (and a description of the data), designed to meet the information needs of an organization.   Shared collection: can be used simultaneously by many departments and users.   Logically related: A DB comprises the important objects and the relationships between these objects.   Description of the data – the system catalog (meta-data) provides description of data to enable data independence.

7 1-7 Terminology DBMS (Database Management System):   A software system that enables users to define, create, and maintain databases and that provides controlled access to the databases. Database Application Programs:   Software programs that interact with the database by issuing appropriate requests (typically SQL statements) to the DBMS.

8 1-8 Three-level Database Architecture   Three levels of abstraction – external, conceptual, internal schemas   To alleviate problems with program maintenance (Handle change over time and hide complexity of DB structure)   Data needs of users may change over time   Can change logical structure without affecting all users, e.g., adding a new column or table   Can change data and file structures without affecting overall logical structure or users' views   Can change the physical aspects of storage without affecting database structure   Hides complexity of database storage structures

9 1-9 Three Schema Architecture and Data Independence 1.4 Architecture of DBMS

10 1-10 External Level Schema   This level concerns user view ( 使用者的觀看 )   The way users think about data   Consists of the models or views of many user from different departments   External records - records seen by users   May include calculated or virtual data   Used to create user interface

11 1-11 Conceptual Level Schema   This level concerns community view ( 整體企業的觀點 )   Include entire information structure of the database   Denote the logical meaning of the database   Collections of logically related records   Represented by entities, attributes, relationships   Includes data item types, record types, relationships, constraints, semantic information, security and integrity information   Relatively constant over time

12 1-12 Internal Level Schema   This level concerns storage view ( 儲存的觀點 ) of the DB   Define physical storage structures, i.e., the way the data is actually stored using standard data structures and file organizations used by DBMS   Depends on what DBMS is used   Define files, collections of data on a storage device such as a hard disk.   OS (Operating system) creates physical files and records

13 1-13 3-Level Example of DB Architecture 1.4 Architecture of DBMS ( 生日 ) ( 外觀 1) ( 外觀 2)

14 1-14 Five Components Of DBMS Environment   Hardware   The computer system(s) that the DBMS and the application programs run on. This can range from a PC, a single mainframe, to a network of computers.   Software   DBMS, operating system, network software (if necessary) and also the application programs.   Data   Operational data used by an organization   A description of the data, called meta-data

15 1-15 Five Components Of DBMS Environment   Procedures   Instructions and rules that govern the design and use of the database.   Examples: instructions on how to   Log on to the DBMS   Make backup copies of the database   Handle hardware or software failures   People   Database designer   Database administrator (DBA)   Application programmers   End users

16 1-16 Functions of DBMS   Data Storage, Retrieval and Update   The DBMS should hide the internal physical implementation details of databases (such as file organization and storage structure) from the users 1/10

17 1-17 Functions of DBMS   System Catalog   Holds data about the structure of databases, users, applications and so on.   Accessible to users and DBMS   Data in system catalog   Names, data type, and sizes of data items   Integrity constraints on the data   Names of authorized users who have access to the data 2/10

18 1-18 Functions of DBMS  Transaction Support  Transaction  An action, or a series of actions, carried out entirely by a single user or application program, which changes the contents of the database.  Ensure that either all the updates corresponding to a given transaction are made or that none of them are made.  Example:  Transfer money from one bank account to another bank account 3/10

19 1-19  Concurrency Control Services  Ensure that database is updated correctly when multiple users are updating the database concurrently.  Example:  An example of the lost update problem Functions of DBMS 4/10 in hard diskin memory

20 1-20 Functions of DBMS  Recovery (復原) Services  A mechanism for recovering the database to a previous consistent state  Transaction may fail because of  Users aborting a transaction before it completes  System crash  Storage media failure  A hardware or software error causing the DBMS to stop  Authorization (使用授權) Services  Ensure that only authorized users can access the database  Protection of the database against unauthorized access, either intentional or accidental 5, 6 / 10

21 1-21 Functions of DBMS  Support for Data Communication  Must be capable of integrating with network/communication software  Integrity Services  Database integrity: Correctness and consistency of stored data  Integrity is concerned with the quality of the data.  Integrity is expressed in terms of constraints  Example:  No member can rent more than 10 video tapes at one time 7, 8 / 10

22 1-22 Functions of DBMS  Services to Promote Data Independence  Achieved through a view mechanism  Logical Data Independence  Physical Data Independence  Utility Services  Data import/export facilities  Performance Monitoring & Tuning facilities 9, 10 / 10


Download ppt "Chapter 1 Introduction to Databases. 1-2 Chapter Outline   Common uses of database systems   Meaning of basic terms   Database Applications  "

Similar presentations


Ads by Google