chapter 4 database management (summary ppt2007)

Upload: mickey-jayin

Post on 07-Apr-2018

230 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Chapter 4 Database Management (Summary PPT2007)

    1/14

  • 8/3/2019 Chapter 4 Database Management (Summary PPT2007)

    2/14

    Database

    A collection of related files

    TARC DB: student file +

    employee file + payment file +result file

    File

    A collection of related records 1DAC student file

    Record

    A collection of related fields NAME+ID+TEL

    Field

    A group of characters N+A+M+E

    Byte/character

    A group of 8 bits A-Z, 0-9, %,#

    Bit

    1 or 0

  • 8/3/2019 Chapter 4 Database Management (Summary PPT2007)

    3/14

    Separate datafiles are created

    and stored foreach

    applicationprogram

    Traditionalapproach

  • 8/3/2019 Chapter 4 Database Management (Summary PPT2007)

    4/14

    Inventory File

    Order Entry File

    Billing File

    Inventory ControlProgram

    Order Entry Program

    Customer BillingProgram

    Secondary storage

  • 8/3/2019 Chapter 4 Database Management (Summary PPT2007)

    5/14

    5

    Student -File

    S_ID Name Address Gender Tel.

    S001 Ivy Liew KL Female 012-12345667

    S002 Ian Lee PJ Male 016-2345678

    S003 Max Teh KL Male 017-9876543

    Exam_File

    S_ID Name Address Gender Tel Subject Grade

    S001 Ivy Liew KL Female 012-12345667 ITS A

    S002 Ian Lee PJ Male 016-2345678 ITS B

    S003 Max Teh KL Male 017-9876543 ITS A

    Traditional ApproachSome data may be duplicated (required extrastorage space)

  • 8/3/2019 Chapter 4 Database Management (Summary PPT2007)

    6/14

    Pool of related

    data is sharedby multipleapplication

    programs

    Databaseapproach

  • 8/3/2019 Chapter 4 Database Management (Summary PPT2007)

    7/14

    Inventory File /Order Entry File /

    Billing File

    Inventory ControlProgram

    Order Entry Program

    Customer BillingProgram

    DBMS

    Secondary storage

  • 8/3/2019 Chapter 4 Database Management (Summary PPT2007)

    8/14

    8

    Student -File

    S_ID Name Address Gender Tel.

    S001 Ivy Liew KL Female 012-12345667S002 Ian Lee PJ Male 016-2345678

    S003 Max Teh KL Male 017-9876543

    Exam_File

    S_ID Subject Grade

    S001 ITS A

    S002 ITS B

    S003 ITS A

    Database ApproachReduce duplication of data (store onlyonce)

  • 8/3/2019 Chapter 4 Database Management (Summary PPT2007)

    9/14

    Relational database

    2D tables, consists of rows &columns

    1) Row = record = tuple = data entity

    2) Column = attribute

    3) Domain = field name = domain description

    4) Primary key => field(s) uniquely identifies therecord

    5) Common field => exists in both files to make a

    relationship between them

  • 8/3/2019 Chapter 4 Database Management (Summary PPT2007)

    10/14

    Student ID Name Address DOB

    A0001 Amber Chia Malaysia 12/3/80

    A0002 Andy Lau Hong

    Kong

    31/8/64

    A0003 Peter Pan UK 3/1/85

    Tuple

    (Record)R1R2

    Domain(column

    description )

    Attributes (Columns)Name attribute, Address attribute, DOB attribute

    Student_File Relation

    primary key

  • 8/3/2019 Chapter 4 Database Management (Summary PPT2007)

    11/14

    Types ofdata files

    Masterfile

    Containing

    permanent recordsthat are generally

    updated periodically

    Transaction

    file

    Temporary holding file

    that holds all changesto be made to themaster file

  • 8/3/2019 Chapter 4 Database Management (Summary PPT2007)

    12/14

    DBMS

    programs that provide users withtools to add, delete, access, and

    analyze data stored in one location

    interface between the databaseand its users and other application

    programs

  • 8/3/2019 Chapter 4 Database Management (Summary PPT2007)

    13/14

    A repository contains data about each

    file in the database and each fieldwithin those files

    Data Dictionary

    Use Query language to retrieve or

    select data from a database

    File Retrieval and

    Maintenance

    Allowed database administrators (DA)to specify different access privileges fordifferent users of a DBMS

    Data Security

    restore the database to a usable form

    in case it is damaged or destroyed

    Backup and

    Security

  • 8/3/2019 Chapter 4 Database Management (Summary PPT2007)

    14/14

    Data is organized by the DBMS

    and stored only onceReduce duplication data

    Reduced data

    redundancy

    No separate files contain copies of the samepiece of data

    Reduce duplicates & inconsistencies inupdating. Thus, improve data integrity

    Improved data

    integrity

    simple commands can begiven to get the requiredinformation

    Better & easieraccess to dataand information

    The data in a database isshared by the entire

    organization

    Shared data