Anda di halaman 1dari 79

Basic Information Technology

Lecturer: Ms. Farwah Ahmad

12/20/16

Kicking off..

Class Rules

On Time
Disciplined
Participative
Decide what will happen if any of the above rule is violated?

Grading Policy

Mid-Term
Final Exam
Teacher Evaluation

25%
50%
25%

Class participation/Attendence
Assignment/Quiz
Project

12/20/16

5%
10%
10%

Chapter 6:
INPUT AND OUTPUT
HARDWARE
3

12/20/16

Data Processing
Data processing:
Any operation or set of operations performed
upon data, whether or not by automatic
means, such as collection, recording,
organization,
storage,
adaptation
or
alteration to convert it into useful information.

Data Processing Cycle


Once data is collected, it is processed to convert it into
useful information. The data is processed again and
again until the accurate result is achieved. This is
called data processing cycle.

1.
2.
3.

The data processing is very important activity and


involves very careful planning. Usually, data
processing activity involves three basic activities.
Input
Processing
Output

Simple example
Example

Process of maintaining a check register.


Transactions checks and deposits are recorded as they occur and the
transactions are summarized to determine a current balance. Monthly the data
recorded in the register is reconciled with a hopefully identical list of
transactions processed by the bank.
A more sophisticated record keeping system might further identify the
transactions for example deposits by source or checks by type, such as
charitable contributions. This information might be used to obtain information
like the total of all contributions for the year.
The important thing about this example is that it is a system, in which, all
transactions are recorded consistently, and the same method of bank
reconciliation is used each time.

Data Processing
Disk

management organizes disk blocks into files


Naming provides file names and directories to
users, instead of tracks and sector numbers (e.g.
Diesburg)
Protection keeps information secure from other
users
Reliability protects information loss due to system
crashes

Ways to Access a File


People

use file systems


Design of file systems involves
understanding how people use file systems

Sequential accessbytes are accessed in order


Random access (direct access)bytes are
accessed in any order

File Organization
Describes

how records
are stored within a file
Two organization
methods

Sequential
Direct (relative)

File Access
Method by which computer programs read or
write records on a file
Sequential access
Direct (random) access

Sequential Access
Every

record on the file


is processed starting
with the first record
until EOF is reached

Sequential Access

The 3 records that


precede it must be
accessed first

Inefficient when records


must be processed in a
sequence other than their
physical order on the
device

Sequential Access Is Efficient


A large

number of the records on the file


must be accessed at any given time

Sequential Access Storage Media


(cont'd.)
Interrecord

gap (IRG)

inch gap inserted between each record


Same size regardless of records it separates

Blocking:

group records into blocks


Transfer rate: (tape density) x (transport speed)
Interblock gap (IBG)

inch gap inserted between each block


More efficient than individual records and IRG
Understanding Operating Systems, Sixth Edition

14

Sequential Access Storage Media


(cont'd.)

Understanding Operating Systems, Sixth Edition

15

Random Access Files

Random access files are files in which records can


be accessed in any order
Also called direct access files
More efficient than sequential access files

Direct (Random) Access


A

high percentage of todays


information processing must be
done no sequentially
Records are located by knowing
their physical locations or
addresses on the device rather
than their positions relative to
other records

Direct Access Storage Devices

Directly read or write to specific disk area


Random access storage devices
Four categories
Magnetic disks
Optical discs
Flash memory
Magneto-optical disks
Access time variance
Not as wide as magnetic tape
Record location directly affects access time

Compare Looking for a Recording on


a CD versus on a Cassette Tape
DIRECT

SEQUENTIAL
Data stored on a CD device (direct-access) can be accessed either
sequentially or nonsequentially
Data stored on a tape (sequential access) can be accessed only
sequentially

Main Disadvantage of
Nonsequential Access

You must know a records


address to find it
Process of calculating or
looking up an address takes
more time than getting the
next record as is done with
sequential access

You must weigh

amount of time it takes to find


individual records
number of records to be
accessed

DATA MANAGEMENT

21

12/20/16

Motivation

Most computers are used for data


processing, as a big growth area in the
information age
Data processing from a computer science
perspective:

22

Storage of data
Organization of data
Access to data
Processing of data

CNG 351

Data Structures vs File Structures


Both

involve:

Representation of Data
+
Operations for accessing data

Difference:

23

Data structures: deal with data in the main memory


File structures: deal with the data in the secondary
storage
CNG 351

Structural and Data Dependence


Structural

Access to a file depends on its structure

Data

dependence

Changes in the data storage characteristics without


affecting the application programs ability to access
the data
Logical data format
How

dependence

the human being views the data

Physical data format


How

the computer sees the data

Field Definitions and Naming


Conventions
Flexible

record definition anticipates reporting


requirements by breaking up fields into their
component parts
Example:
Cutomer Last Name . Cus-LName

Data Redundancy
Data redundancy results in data inconsistency
Different and conflicting versions of the same
data appear in different places
Errors more likely to occur when complex entries
are made in several different files and/or recur
frequently in one or more files
Data anomalies develop when required changes
in redundant data are not made successfully

Data Redundancy
Types of data anomalies:
Update

anomalies

Occur when changes must be made to existing


records

Insertion

Occur when entering new records

Deletion

anomalies
anomalies

Occur when deleting records

Database Systems
Problems

inherent in file systems make using


a database system desirable
File system

Many separate and unrelated files

Database

Logically related data stored in a single logical


data repository

Database Systems

Where do File Structures fit in


Computer Science?
Application
DBMS
File system
Operating System
Hardware

30

CNG 351

File Attributes

Name only information kept in human-readable form


Identifier unique tag (number) identifies file within file system
Type needed for systems that support different types
Location pointer to file location on device
Size current file size
Protection controls who can do reading, writing, executing
Time, date, and user identification data for protection, security,
and usage monitoring
Information about files are kept in the directory structure, which is
maintained on the disk
Many variations, including extended file attributes such as file
checksum
Information kept in the directory structure

Data and Information


DATA: Facts concerning people, objects, vents or
other entities. Databases store data.
INFORMATION: Data presented in a form suitable for
interpretation.
Data is converted into information by programs and
queries. Data may be stored in files or in databases.
Neither one stores information.
KNOWLEDGE: Insights into appropriate actions based
on interpreted data.

Knowledge Generation

DATA

INFORMATION

File Management

Managing the computer is essential in


becoming computer competent.
File management essentials:

The big picture of file management


The specifics of actually managing files

File Management Systems


Provided facilities to extract data and share
files, but did not implement any way to
connect records in one file to those in
another.
Relationships had to be
implemented in application code.

File Based Systems


Application

File

Delivery
List

Toys
Addresses

Coal
Estimation

Naughty

Just what
asked for

Nice

Toys

File Based Information Systems

Conventional Data Processing techniques:

Enterprise:
Application
System A

Application
System B

Application
Program A

Application
Program B

File System A

Customer

File System B

Invoice

File System N

Inventory

Application
System N

Application
Program N

1-37

File Based Information Systems (cont.)

Customer
Customer No.
Customer Name
Customer Addr.
Social Security ID

Inventory
Part No.
Part Description
Unit Price
Supplier
Quantities Remain
Quantities Ordered

Invoice
Customer No.
Customer Name
Part No.
Quantities
Unit Price

Parts
Part No.
Part Description
Supplier
Quantities Ordered
Customer Name
1-38
Unit Price

39

12/20/16

From File Systems to DBMS


Problems

with File Processing systems

Inconsistent Data
Inflexibility
Limited Data Sharing
Poor enforcement of standards
Excessive program maintenance

Files and Databases


File:

A collection of records or documents


dealing with one organization, person, area or
subject. (Rowley)

Manual (paper) files


Computer files

Database:

A collection of similar records with


relationships between the records. (Rowley)

bibliographic, statistical, business data, images, etc.

Files and Databases


Metadata
Data about data

Description of fields
Display and format instructions
Structure of files and tables
Security and access rules
Triggers and operational rules

Database vs File Systems


Program 1

Meta-Data

Program 2

Meta-Data

Program 3

Meta-Data

Program 1
Program 2
Program 3

FILE SYSTEM

Data

DATABASE
MetaData

Data

Database
A Database

is a collection of stored operational


data used by the application systems of some
particular enterprise. (C.J. Date)

Paper Databases
Still

contain a large portion of the worlds knowledge

File-Based Data Processing Systems


Early

batch processing of (primarily) business data

Database Management Systems (DBMS)

Basic Approach - Integration

(1) Integration of Information

Description of the integrated view of data is the


"Conceptual Schema" of the database
DBMS

Application
program

1-45

Basic Principles
DATABASE: A shared collection of interrelated data
designed to meet the varied information needs of
an organization.
DATABASE MANAGEMENT SYSTEM: A collection
of programs to create and maintain a database.
Define
Construct
Manipulate

What is a Database Management


System?
Data Files
Directory
Access Engine
Utility Programs

Database
DATA
METADATA
ACCESS ENGINE
UTILITIES

Database Access
USER
INTERFACE

DATABASE

PROGRAM

DBMS Benefits
Minimal Data Redundancy
Consistency of Data
Integration of Data
Sharing of Data
Ease of Application Development
Uniform Security, Privacy, and Integrity Controls
Data Accessibility and Responsiveness
Data Independence
Reduced Program Maintenance

Why Database ?

Redundancy can be reduced


Inconsistency can be avoided
The data can be shared
Standards can be enforced
Security restrictions can be applied
Integrity can be maintained
Provision of data independence
objective !
1-51

Objectives of the DBMS Approach


SELF-DESCRIBING
DATA INDEPENDENCE
MULTIPLE

VIEWS
MULTIPLE USERS

History of Database Management


File

Management Systems
Hierarchical Model
IBM Information Management System (IMS) 1966
Network

Model

Charles Bachmans Integraded Data Store (IDS) 1965


Conference on Data Systems Languages /DataBase
Task Group CODASYL/DBTG (1971)
Relational

Model

E.F. Codd, 1970

Data

Model:
A set of concepts to describe the structure of a
database, and certain constraints that the
database should obey.
Data

Model Operations:
Operations for specifying database retrievals
and updates by referring to the concepts of
the data model.

Structured Databases
Relationships were implemented by physical
pointers (called sets) which allowed records
to be connected in different files.
Hierarchical databases allow only one parent
set; networks allow several. These permit
efficient processing but the sets must be
constructed on data entry and cannot be
rearranged later.

Relational Models
Relational models implement relationships
with matched data values in related files
(called primary and foreign keys).
Any
attributes can be matched. The connection
is established at retrieval so interconnections
can be developed as needed.

Relational Database
Primary Key (PK, Key)

Foreign Key (FK)

Customer(CustomerID, Name, )
Order(OrderID, CustomerID, OrderDate, )
ItemOrdered(OrderID, ItemID, Quantity, )
Item(ItemID, Description, Price, )
Data organized as logical tables, consisted of rows (records) and
columns (attributes), and connected via key attributes.
Possible to retrieve almost any combination of rows and columns,
and a specific piece of data within a row.
Pointers transparent to developers, just need to specify Primary
Key (PK)Foreign Key (FK) relationships.
58
of

HIERARCHICAL MODEL

ADVANTAGES:

Hierarchical Model is simple to construct and


operate on
Corresponds to a number of natural
hierarchically organized domains - e.g.,
assemblies in manufacturing, personnel
organization in companies
Language is simple; uses constructs like GET,
GET UNIQUE, GET NEXT, GET NEXT WITHIN
PARENT etc.

DISADVANTAGES:

Navigational and procedural nature of


processing
Database is visualized as a linear arrangement of
records
. Little scope for "query optimization"

Hierarchical Database
First commercial standard (IBMs IMS)
Still used in legacy systems
Customers
file folders which contain
orders which contain items

Entry point
Customer
XYZ
pointers

Order 2

Order 1
Order
files

pointers

Item A
Items
Item# ItemName
998 Dog Food
764 Cat Food

64
of

Quantity
12
11

Item B

Item A

Item C

To retrieve how many of item A are sold, start at


the top from Customer. Then all nested data
are retrieved top-down and left-right.
Different data models needed for different
retrieval tasks (e.g., Order at the root) =>
high data redundancy in hierarchical DBS!

Hierarchy
SECTION

STUDENT

COLLEGE

INSTRUCTOR

COLLEGE

Each file can have only one parent. To implement a second parent (COLLEGE)
we have to implement a shadow copy.

NETWORK MODEL

ADVANTAGES:

Network Model is able to model complex


relationships and represents semantics of
add/delete on the relationships.

Can handle most situations for modeling using


record types and relationship types.

Language is navigational; uses constructs like


FIND, FIND member, FIND owner, FIND NEXT
within set, GET etc. Programmers can do optimal
navigation through the database.

DISADVANTAGES:

Navigational and procedural nature of processing

Database contains a complex array of pointers


that thread through a set of records.

Little scope for automated "query optimization"

Network Database

Entry point
Relationships between records also
supported by pointers;
complex programming.

Customer
XYZ

Order 1

Order 2

Entry points
Item A

Item B

Item C

One data model supports different retrieval paths (by


customer, order, item).
71
of

Network
SECTION

STUDENT

INSTRUCTOR

COLLEGE
Each file can have several parents. Both SECTION and COLLEGE are parent
files..

Relational
SECTION
SECTION-STUDENT

SECTION-KEY
STUDENT-KEY

SECTION-INSTRUCTOR

SECTION-KEY
INSTRUCTOR-KEY

INSTRUCTOR

STUDENT

COLLEGE-KEY

COLLEGE-KEY
COLLEGE

Each file can have several parents. Both SECTION and COLLEGE are parent
files..

Relational Terminology
Entity

Person, place, thing or event about which we wish


to keep data

Attribute

property of an entity

Relationship

an association among entities (entity records)

Advantages of Database
Processing
More

information
from same data
Shared data
Balancing conflicts
among users
Controlled
redundancy
Consistency

Integrity
Security
Increased

productivity
Data
independence

Disadvantages of Database
Processing
Increased

size
Increased complexity

More expensive personnel

Increased

impact of failure
Difficulty of recovery
Cost

Especially server and mainframe systems

Terms and Concepts


Database

Management System -- DBMS

Software system used to define, create, maintain


and provide controlled access to the database
and repository

Application for Data management


software
Education
Public

Health
Law Enforcement
Automotive Repair
Libraries
Agriculture

80

12/20/16

81

12/20/16

Anda mungkin juga menyukai