Lecture 3 - History of Database, Types of Databases, Components of DBMS

Embed Size (px)

Citation preview

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    1/42

    DBMS

    Lecture 3

    History of DatabaseFile System

    3 Levels of Abstraction

    Types of DatabasesComponents of DBMS

    Zeshan Ahmer

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    2/42

    2

    Brief History of Database Systems

    1940's, 50's Initial use of computers as

    calculators. Limited data, focus on algorithms.

    Science, military applications

    1960's Business uses. Organizational data,

    customer data, sales, inventory, accounting, etc.

    File system based, high emphasis on

    applications programs to extract and assimilatedata. Larger amounts of data, relatively simple

    calculations

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    3/42

    3

    1970's The relational model. Data separated

    into individual tables. Related by keys. Initially

    required heavy system resources. Examples:

    Oracle, Sybase, Informix, IBM DB2

    1980's Microcomputers - the IBM PC, Apple

    Macintosh. Database program such as DBase,Paradox, FoxPro, MS Access. Individual user

    can create, maintain small databases

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    4/42

    4

    Late- 1980's Local area networks. Workgroups

    sharing resources such as files, printers, e-mail

    Client/Server Database resides on a centralserver, applications programs run on client PCs

    attached to the server over a LAN

    1990's Internet and World Wide Web makedatabases of all kinds available from a single

    type of client - the Web Browser

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    5/42

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    6/42

    6

    A Simple Architecture

    A Simple Architecture

    SQL

    C/C++

    Programs

    DBMS

    ApplicationsDatabases

    Shared facilities:

    Backup and recovery

    Data storage and

    access modules

    Programming tools,

    etc.

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    7/42

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    8/42

    8

    Limitations of a File System

    Separated and Isolated Data - Coordination and

    representation of data is difficult

    Data Duplication - Wastes space and can lead todata integrity (inconsistency) problems

    Application Program Dependencies - Changes

    to a single file can require changes to numerous

    application programs

    Lack of Data Sharing - Difficult to control access

    to files

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    9/42

    9

    Purpose of Database SystemsPurpose of Database Systems

    Database management systems were

    developed to handle the difficulties causedby different people writing different

    applications independently

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    10/42

    10

    A DBMS attempts to resolve the following

    problems:

    Data redundancy and inconsistency by keeping one

    copy of a data item in the database

    Difficulty in accessing data by providing query

    languages

    Integrity problems by enforcing constraints (age >

    0)

    Concurrent access by multiple users

    Security problems

    Purposes of Database SystemsPurposes of Database Systems

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    11/42

    11

    Integrated Database Environment

    Byte

    Data-item or field

    Record

    File or Table

    DatabaseDatabase management systems

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    12/42

    12

    Unit of measurement of data

    One Byte -8

    bits

    Maximum value in one bit

    Maximum value in one byte

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    13/42

    13

    Integrated Database Environment DataStorage Hierarchy

    Database

    Record

    File

    Field

    Character(byte)

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    14/42

    14

    Advantages of Database Approach

    Minimal data redundancy

    Data consistency and Integrity - by

    controlling access and minimizing data

    duplication

    Enforcement of standards

    Uniform security

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    15/42

    15

    Application program independence - by storingdata in a uniform fashion

    Data Sharing - by controlling access to data

    items, many users can access data concurrently

    Backup and Recovery

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    16/42

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    17/42

    17

    Cost issue

    Related with developing DBMS

    Related with hardware cost

    Related with higher programming

    cost / users trainingRelated with conversion cost

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    18/42

    18

    3-level architecture

    User/View Level

    Logical Level

    Physical Level

    v1 v2 v3

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    19/42

    19

    3-Level Architecture

    Logical Level:

    e.g. tables

    STUDENT (roll number, name)COURSE (roll number, course id, grade)

    Physical Level:

    how are these tables stored, how many bytes,

    restrictions etc

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    20/42

    20

    User/View Level, e.g.:

    v1: select roll number from student

    v2: select roll number , course id from course

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    21/42

    21

    view 1 view 2.....

    view n

    Logical

    view

    Physical

    view

    Payroll Inventory Sales

    Company database

    Files on disks

    Three Levels of AbstractionThree Levels of Abstraction

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    22/42

    22

    View Level:

    Define a subset of the database for a

    particular application

    Logical Level:

    Describes data stored in database, and therelationships among the data

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    23/42

    23

    Physical Level:

    Describe how a record is stored on disks.

    e.g., Divide the customer records into 3

    partitions and store them on disks 1, 2 and

    3

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    24/42

    24

    DatabasesT

    ypes & Physical Locations

    Shared Databases

    Shared by users in an organization within one

    location

    Typically found on local-area networks

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    25/42

    25

    Databases

    Types & Physical Locations

    Distributed Databases

    Database stored on different computers in

    different locations connected by a client / server

    type of network

    Two methods are:Partitioning

    Duplicating

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    26/42

    26

    DatabasesT

    ypes & Physical Locations

    Centralized Databases

    Database stored in one location that can be

    accessed by different computers in different

    locations via communication networks

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    27/42

    27

    Database Administrator (DBA)

    The person who co-ordinates all related

    activities and needs for an organizations

    database

    Responsibilities include:

    database design, implementation and operation

    user coordination

    system security

    backup and recovery

    performance monitoring

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    28/42

    28

    schema definition (logical level)

    Physical schema (storage structure,

    access methods)

    schemas modifications

    granting authorizations

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    29/42

    29

    Components of DBMS

    Data

    Hardware

    Software

    Users

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    30/42

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    31/42

    31

    User Data

    Data users work with directly by entering,

    updating and viewing

    For our purposes, data will be generallystored in tables with some relationships

    between tables

    Each table has one or more columns. Aset of columns forms a database record

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    32/42

    32

    Meta Data

    Recall that a database is self

    describing

    Metadata: Data about data

    Data that describe how user data are stored interms of table name, column name, data type,

    length, primary keys, etc

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    33/42

    33

    Metadata are typically stored in System tables

    or System Catalog and are typically only

    directly accessible by the DBMS or by the

    system administrator. Have a look at theDatabase Documenter feature of MS Access

    (under the tools menu, choose Analyze and then

    Documenter)

    This tool queries the system tables to give all

    kinds of Metadata for tables, etc. in an MS

    Access database

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    34/42

    34

    Indexes

    In keeping with our desire to provide users with

    several different views of data, indexes provide

    an alternate means of accessing user data.

    Sorting and Searching:

    An index for our new banking example might

    include the account numbers in a sorted order

    Indexes allow the database to access a record

    without having to search through the entire table

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    35/42

    35

    Updating data requires an extra step: The

    index must also be updated

    Example:

    Index in a book consists of two things:

    1) A Keyword stored in order

    2) Apointerto the rest of the information. In thecase of the book, the pointer is a page number

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    36/42

    36

    Roles Involve In Integrated Database Environment

    Database Administrator

    Application Programmers

    End-users

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    37/42

    37

    Files ManagementBasic File Operations

    The operations possible on a file are:

    Open

    Close

    Save

    Save As

    Print

    Import / Export

    Upload / Download

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    38/42

    38

    Files ManagementFile Manipulation Operations

    Some operations are used for filemanipulation:

    Creation of tables

    Insertion of records

    Deletion of records

    Modification of records

    Sorting of records

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    39/42

    39

    Files ManagementTypes Of Files

    Data Files - contain only data

    Master File - contain relatively permanent recordsthat are periodically updated

    Transaction File - a temporary holding file that holds

    all changes to be made to the master file

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    40/42

    40

    Files ManagementTypes Of Files

    Table Files

    Table files are permanent files containing

    reference data used when processingtransaction files

    Report Files

    These are the collected contents of individual

    repots or documents produced by the system

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    41/42

    41

    Files Management

    Data Processing Methods

    Online Processing

    Also called real-time processing

    Transactions entered into a computer systems asthey take place, and update the master files as the

    transactions occur

    Storage must be online and fast

    May require expensive infrastructure

    Used in financial institutions, airline etc

  • 8/7/2019 Lecture 3 - History of Database, Types of Databases, Components of DBMS

    42/42

    42

    Files Management

    Data Processing Methods

    Batch Processing

    Data collected over certain period of time in a

    transaction file and then processed against a master

    file all at one time

    Less expensive but slow procedure

    Uses offline storage method

    Widely used in financial institutions computerized

    system