lec1-MT07

  • Upload
    le-viet

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

  • 8/8/2019 lec1-MT07

    1/39

    ata ase ystem oncepts

  • 8/8/2019 lec1-MT07

    2/39

    Outline

    File-based Approach

    Database Approach Database Systems

    Roles in the Database Environment

    DBMSs

    ree- c ema rc ec ure an a a n epen ence

    Database Languages

    Data Models, Database Schema and Database State

    Data Management Systems Framework Where are we?

    Extending database capabilities for new applications

    Reading Suggestion: [1,2]: Chapters 1, 2

    ) 2

  • 8/8/2019 lec1-MT07

    3/39

    File-based Approach

    Data is stored in one or more separate computer

    Data is then processed by computer programs -

    3

  • 8/8/2019 lec1-MT07

    4/39

    File-based Approach

    4

  • 8/8/2019 lec1-MT07

    5/39

    File-based Approach

    Problems/Limitations

    Data Inconsistency

    More details: see 2

    5

  • 8/8/2019 lec1-MT07

    6/39

    C u s to m e r

    F i l e s

    Files

    File-based approach

    C u s t o m e r

    O r d e r s

    F i l e

    S t o c k

    F i l e

    A p p li c a t io n s

    pplications

    Customer

    Customer

    File

    C u s to m e r

    F i l e

    r e r

    F i l e Orders

    Stock

    File

    C u s t o m e r

    I n v o ic i n g

    O r d e r

    F i l e

    S t o c k

    F i l e

    OrderFile

    ustomer

    Invoicing

    P u r c h a s e

    O r d e r s

    S t o c k

    F i l e

    Purchase

    OrdersSupplier

    F i l e

    S t o c k

    C o n t r o l

    S t o c k

    F i l eStock

    Control

    6

    O r d e r

    F i l eShared file approach

  • 8/8/2019 lec1-MT07

    7/39

    File-based Approach

    Shared File Approach Data (files) is shared between different applications

    Data redundancy problem is alleviated Data inconsistency problem across different versions ofthe same file is solved

    Other problems:Rigid data structure: If applications have to share files, the file structure that suits

    one application might not suit another

    some way, this alteration will need to be reflected in all application programs thatuse that data file

    No support of concurrency control: While a data file is being processed by oneapplication, the file will not be available for other applications or for ad hoc queries

    7

  • 8/8/2019 lec1-MT07

    8/39

    Outline

    FileFileFile---based Approachbased Approachbased Approach

    Database Approach Database Systems

    Roles in the Database Environment

    DBMSs

    ree- c ema rc ec ure an a a n epen ence

    Database Languages

    Data Models, Database Schema and Database State Data Management Systems Framework

    Where are we?

    Extending database capabilities for new applications

    Reading Suggestion: [1,2]: Chapters 1, 2

    8

  • 8/8/2019 lec1-MT07

    9/39

    Database Approach

    Arose because: ,

    rather than being stored separately and independently No control over access and manipulation of data beyond

    Result: The Database and Database Mana ement S stem

    (DBMS).

    9

  • 8/8/2019 lec1-MT07

    10/39

    Database Approach

    10

  • 8/8/2019 lec1-MT07

    11/39

    Database Approach

    Data

    meaning Information? Knowledge?

    ore: www.w a s.com

    Database: Shared collection of logically related data,

    information needs of an organization

    11

  • 8/8/2019 lec1-MT07

    12/39

    Database Approach

    System catalog (metadata) provides description of data toenable programdata independence

    og ca y re a e a a compr ses en es, a r u es, an

    relationships of an organizations information DataBase Management System (DBMS): a general-purpose

    so ware sys em a ac a es e processes o e n ng,constructing, manipulating, and sharing databases among

    various users and applications (or a software system that, , ,to the database)

    12

  • 8/8/2019 lec1-MT07

    13/39

    Database Approach

    Data Definition Language (DDL) Permits specification of data types, structures and any data constraints to be

    stored in the database

    All specifications are stored in the database

    Data manipulation language (DML). Query language: retrieve (query), update (insert, delete, modify)

    ontro e access to ata ase may nc u e: a security system

    an integrity system

    a recovery control system

    a user-accessible catalog

    Database System = the Database + DBMS software

    13

  • 8/8/2019 lec1-MT07

    14/39

    Database Approach

    Roles in the Database Environment

    Database Administrator DBA : res onsible for authorizin access to

    DB, coordinating & monitoring its use, and for acquiring software and

    hardware resources as needed

    Database Desi ners: res onsible for identif in the data to be stored

    in DB, choosing appropriate structures to represent and store this

    data

    A lication Pro rammers

    End Users

    More details: see [1,2]-chapter 1

  • 8/8/2019 lec1-MT07

    15/39

    Database Approach

    15

  • 8/8/2019 lec1-MT07

    16/39

    Database Approach

    Characteristics of the Database Approach Self-describing nature of a database system

    Insulation between programs and data, and data abstraction

    Program-data independence + Program-operation independence = Dataabstraction

    a a mo e s a ype o a a a s rac on

    Support of multiple views of the data

    Sharing of data and multi-user transaction processing er a van ages o us ng e approac : see - .

    16

  • 8/8/2019 lec1-MT07

    17/39

    Database Approach

    History of database systems

    Second generation: Relational

    Third eneration: Ob ect-Relational Ob ect-Oriented

    Brief history of database applications

    see 1 -section 1.7

    17

  • 8/8/2019 lec1-MT07

    18/39

    Example of Network Model Schema

    Slide 2- 18

  • 8/8/2019 lec1-MT07

    19/39

    Example of Relational Model Schema

    Slide 1- 19

  • 8/8/2019 lec1-MT07

    20/39

    Outline

    FileFileFile---based Approachbased Approachbased Approach

    Database ApproachDatabase ApproachDatabase Approach Database SystemsDatabase SystemsDatabase Systems

    Roles in the Database EnvironmentRoles in the Database EnvironmentRoles in the Database Environment DBMSsDBMSsDBMSs

    ree- c ema rc ec ure an a a n epen ence

    Database Languages

    Data Models, Database Schema and Database State Data Management Systems Framework

    Where are we?

    Extending database capabilities for new applications

    Reading Suggestion: [1,2]: Chapters 1, 2

    20

  • 8/8/2019 lec1-MT07

    21/39

    Three-Schema Architecture and Data

    Inde endence Objectives of Three-Schema Architecture

    Users should not need to know physical database storagedetails

    s ou e a e o c ange a a ase s oragestructures without affecting the users views

    Internal structure of database should be unaffected bychanges to physical aspects of storage

    DBA should be able to change conceptual structure ofdatabase without affectin all users

    21

  • 8/8/2019 lec1-MT07

    22/39

    Three-Schema Architecture and Data

    Inde endence Three-level architecture and data independence

    22

  • 8/8/2019 lec1-MT07

    23/39

    Three-Schema Architecture and Data

    Inde endence External Level

    Describes that part of database that is relevant to aparticular user

    Conceptual Level

    Community view of the database Describes what data is stored in database and

    relationships among the data

    23

  • 8/8/2019 lec1-MT07

    24/39

    Three-Schema Architecture and Data

    Inde endence Internal Level

    .

    Describes how the data is stored in the database

    24

  • 8/8/2019 lec1-MT07

    25/39

    Three-Schema Architecture and Data

    Inde endence

    25

  • 8/8/2019 lec1-MT07

    26/39

    Three-Schema Architecture and Data

    Inde endence Data Independence is the capacity to change the

    having to change the schema at the next higherlevel

    Logical Data Independence

    Refers to immunity of external schemas to changes inconceptual schema

    Conceptual schema changes (e.g. addition/removal of

    or rewrites of application programs

    26

  • 8/8/2019 lec1-MT07

    27/39

    Three-Schema Architecture and Data

    Inde endence Physical Data Independence

    the internal schema Internal schema changes (e.g. using different file

    organizations, storage structures/devices) should not

    require changes to conceptual or external schemas

    27

  • 8/8/2019 lec1-MT07

    28/39

    Three-Schema Architecture and Data

    Inde endence

    28

  • 8/8/2019 lec1-MT07

    29/39

    Outline

    FileFileFile---based Approachbased Approachbased Approach

    Database ApproachDatabase ApproachDatabase Approach Database SystemsDatabase SystemsDatabase Systems

    Roles in the Database EnvironmentRoles in the Database EnvironmentRoles in the Database Environment DBMSsDBMSsDBMSs

    reereeree--- c ema rc ec ure an a a n epen encec ema rc ec ure an a a n epen encec ema rc ec ure an a a n epen ence

    Database Languages

    Data Models, Database Schema and Database State Data Management Systems Framework

    Where are we?

    Extending database capabilities for new applications

    Reading Suggestion: [1,2]: Chapters 1, 2

    29

  • 8/8/2019 lec1-MT07

    30/39

    Database Languages

    Data Definition Language (DDL) allows the DBA or user todescribe and name entities, attributes, and relationships

    security constraints Data Manipulation Language (DML) provides basic data

    Data Control Language (DCL) defines activities that are not

    in the categories of those for the DDL and DML, such as,changes to a databases should be irrevocably made

    30

  • 8/8/2019 lec1-MT07

    31/39

    Database Languages

    Procedural DML allows user to tell system exactlyhow to manipulate data (e.g., Network and

    erarc ca s

    Non-Procedural DML (declarative language) allows

    is to be retrieved (e.g., SQL, QBE)

    Fourth Generation Languages (4GLs) on-proce ura anguages: , , e c. Application generators, report generators, etc. (see [2])

    31

  • 8/8/2019 lec1-MT07

    32/39

    Outline

    FileFileFile---based Approachbased Approachbased Approach

    Database ApproachDatabase ApproachDatabase Approach Database SystemsDatabase SystemsDatabase Systems

    Roles in the Database EnvironmentRoles in the Database EnvironmentRoles in the Database Environment DBMSsDBMSsDBMSs

    reereeree--- c ema rc ec ure an a a n epen encec ema rc ec ure an a a n epen encec ema rc ec ure an a a n epen ence

    Database LanguagesDatabase LanguagesDatabase Languages

    Data Models, Database Schema and Database State Data Management Systems Framework

    Where are we?

    Extending database capabilities for new applications

    Reading Suggestion: [1,2]: Chapters 1, 2

    32

    D t M d l D t b S h d

  • 8/8/2019 lec1-MT07

    33/39

    Data Models, Database Schema andDatabase State

    Data Model: An integrated collection of concepts fordescribing data, relationships between data, and constraints

    Categories of data models include: Object-based (Conceptual)

    Describe data at , - ,

    Record-based (Representational)Relational, Network, Hierarchical

    the conceptual &

    external levels

    Physical: used to describe data at the internal level

    33

    D t M d l D t b S h d

  • 8/8/2019 lec1-MT07

    34/39

    Data Models, Database Schema andDatabase State

    Database Schema: the description of a database,

    expected to change frequently

    Database State (Snapshot): the data in the

    database at a articular moment in time

    34

  • 8/8/2019 lec1-MT07

    35/39

    Outline

    FileFileFile---based Approachbased Approachbased Approach

    Database ApproachDatabase ApproachDatabase Approach Database SystemsDatabase SystemsDatabase Systems

    Roles in the Database EnvironmentRoles in the Database EnvironmentRoles in the Database Environment DBMSsDBMSsDBMSs

    reereeree--- c ema rc ec ure an a a n epen encec ema rc ec ure an a a n epen encec ema rc ec ure an a a n epen ence

    Database LanguagesDatabase LanguagesDatabase Languages

    Data Models, Database Schema and Database StateData Models, Database Schema and Database StateData Models, Database Schema and Database State Data Management Systems Framework

    Where are we?

    Extending database capabilities for new applications

    Reading Suggestion: [1,2]: Chapters 1, 2

    35

  • 8/8/2019 lec1-MT07

    36/39

    Data Management Systems Framework

    Where are we?

    Visualization, Collaborative Computing, Mobile Computing,

    Knowledge-based Systems

    Application

    Layer

    Data Warehousing, Data Mining, Internet DBs, Collaborative, P2P &

    Grid Data Management

    La er 2: intero erabilit & mi ration

    Data

    ManagementHeterogeneous DB Systems, Client/Server DBs, Multimedia DB

    Systems, Migrating Legacy DBs

    Layer 1: DB technologies

    ayer

    DB Systems, Distributed DB SystemsNetworking, Mass Storage, Agents, Grid Computing Infrastructure,

    Parallel & Distributed Processing, Distributed Object ManagementSupporting

    La er

    36

  • 8/8/2019 lec1-MT07

    37/39

    Data Management Systems Framework

    Extending database capabilities for new applications

    Exam le a lications: stora e and retrieval of ima es videos data

    mining (large amounts of data need to be stored and analyzed),

    spatial databases, time series applications,

    More com lex data structures than relational re resentation

    New data types except for the basic numeric and character string

    types

    New storage and retrieval methods

    New security mechanisms

    37

  • 8/8/2019 lec1-MT07

    38/39

    Summary

    File-based Approach

    Three-Schema Architecture and DataInde endence

    Database Languages

    Data Models Database Schema and DatabaseState

    Data Management Systems Framework (where are

    38

  • 8/8/2019 lec1-MT07

    39/39

    Q&A

    39