Chapter 16-BDP-2oP PDF
Chapter 16-BDP-2oP PDF
Computer Fundamentals
Pradeep K. Sinha
Priti Sinha
Chapter 16
Business Data
Processing
Chapter 16: Business Data Processing Slide 1/52
Learning Objectives
1
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Basic Concepts
Data Processing
Ref. Page 319 Chapter 16: Business Data Processing Slide 4/52
2
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Level 1 Character Multiple related bits are combined to form a character (byte).
Ref. Page 320 Chapter 16: Business Data Processing Slide 5/52
A field having Employee Code First Name Last Name Hours worked Hourly rate Tax rate
4 characters 0004 Kumar Rana 40 14.00 0.09
Employee Code First Name Last Name Hours worked Hourly rate Tax rate
0003 Pratap Singh 43 15.00 0.10
Employee Code First Name Last Name Hours worked Hourly rate Tax rate
0002 Ravi Patel 42 10.00 0.07
Employee Code First Name Last Name Hours worked Hourly rate Tax rate
0001 Pradeep Sinha 45 12.00 0.08
A record
Records
Fields of a file
Ref. Page 321 Chapter 16: Business Data Processing Slide 6/52
3
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Standard Methods of
Organizing Data
File-oriented Approach
Ref. Page 322 Chapter 16: Business Data Processing Slide 8/52
4
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Ref. Page 322 Chapter 16: Business Data Processing Slide 9/52
Ref. Page 322 Chapter 16: Business Data Processing Slide 10/52
5
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Database-oriented Approach
This approach integrates together data from multiple related
files in the form of a database having following properties:
Provides greater query flexibility
Reduces data redundancy
Solves data integrity (inconsistency) problem
Makes data independent of application programs
Includes data security features at database level, record level,
and even at field level
Ref. Page 323 Chapter 16: Business Data Processing Slide 11/52
6
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Ref. Page 323 Chapter 16: Business Data Processing Slide 13/52
File Types
Ref. Page 323 Chapter 16: Business Data Processing Slide 14/52
7
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
File Organization
Ref. Page 324 Chapter 16: Business Data Processing Slide 15/52
Sequential Files
A sequential file stores its records one after another in
ascending/descending order of their key field values
A computer processes a sequential file in the order in which
the file stores its records
Sequential file organization is the most efficient and
economical file organization for applications in which we have
to update a large number of file records at regularly
scheduled intervals
Activity ratio is ratio of total number of records in transaction
file and total number of records in master file
Ref. Page 324 Chapter 16: Business Data Processing Slide 16/52
8
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Sequential Files
Advantages
Simple to understand and use
Easy to organize and maintain
Need relatively inexpensive I/O media and devices
Efficient and economical to use for applications in which activity
ratio is high
Disadvantages
Inefficient and uneconomical to use for applications in which
activity ratio is low
Limited to batch-processing environment because of the need to
accumulate transactions in batches
Precludes possibility of up-to-the-minute data because of the need
to accumulate transactions in batches
Requires extra overhead of sorting the files before using them for
processing
Leads to data redundancy problem
Ref. Page 324 Chapter 16: Business Data Processing Slide 17/52
Direct Files
Direct/random file organization is suitable for applications that
directly locate any record by its key field value, without having to
search through a sequence of other records
A direct file stores each record at a location to which the address-
generating function maps the records key field value
This mechanism is known as hashing and the address-generating
function is called hashing algorithm
Hashing algorithm sometimes maps the key values of two or more
records to same storage address. This problem is known as collision
To search a record, given its key value, the computer applies the
hashing algorithm on the given key to generate its corresponding
address
If required, an application can process the records of a direct file
sequentially in ascending/descending sequence of key field value
(Continued on next slide)
Ref. Page 325 Chapter 16: Business Data Processing Slide 18/52
9
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Direct Files
Advantages
Can quickly locate and retrieve any record directly
Does not require sorting of transactions
Does not require accumulation of transactions in batches
Can support interactive online applications
Application can process direct file records sequentially
Disadvantages
Require relatively expensive hardware and software resources
Due to address generation overhead involved, they are less
efficient and economical than sequential files for high activity ratio
applications
Often require special security and access synchronization
mechanisms
Ref. Page 326 Chapter 16: Business Data Processing Slide 19/52
Ref. Page 326 Chapter 16: Business Data Processing Slide 20/52
10
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Employee Address
Address location Employee record
code (key) location
0001 1003 1001 0002 R. S. Patel
0002 1001 1002 0004 R. K. Rana
0003 1004 1003 0001 K. P. Sinha
0004 1002 1004 0003 N. P. Singh
Ref. Page 327 Chapter 16: Business Data Processing Slide 21/52
Advantages
Applications in which activity ratio is high, can use index sequential
files quite efficiently for sequential processing
Applications in which activity ratio is low, can also use index
sequential files quite efficiently for direct access processing
Disadvantages
Require relatively expensive hardware and software resources
Require more storage space than other types of files
Are unsuitable for online applications requiring direct access to
records
Ref. Page 327 Chapter 16: Business Data Processing Slide 22/52
11
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
File Utilities
Are routines, which perform generic operations on data files
Sorting utility
Arranges records of a file in some defined sequence
Keys determine the sorting sequence of the files records
Enables users to specify their sequencing requirements for a
file by means of input parameters
Reads un-sequenced records of an input file, and by means of
various copying techniques, ultimately produces an output file
containing records of the input file in desired sequence
Searching utility
Finds a particular record in a file
Matches the specified key values with their values in each
record to search the desired record
Efficiency of a search algorithm depends on file organization
(Continued on next slide)
Ref. Page 327 Chapter 16: Business Data Processing Slide 23/52
File Utilities
Searching a record from a direct or index sequential file
requires much less time than searching a record from a
sequential file
Merging utility
Combines records of two or more ordered (sorted) files into a
single ordered file
Requires records of each of the input files to be sorted in the
same order, although their record layout need not be identical
Places records from each of the input files in their correct
relative order, producing an output file having all records in the
same order as input files
Copying utility
Produces a copy of a file either from one unit of a storage
device to another similar unit or from one storage medium to
another (Continued on next slide)
Ref. Page 328 Chapter 16: Business Data Processing Slide 24/52
12
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
File Utilities
Ref. Page 329 Chapter 16: Business Data Processing Slide 25/52
File Utilities
Maintenance utility
Copies data from one or more files to a new file selectively, or
updates a files contents selectively
Ref. Page 329 Chapter 16: Business Data Processing Slide 26/52
13
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Sorting on one key in ascending Sorting on two keys in ascending employee-code (secondary
employee-code sequence key) within ascending department-code (primary key)
Ref. Page 328 Chapter 16: Business Data Processing Slide 27/52
Ref. Page 329 Chapter 16: Business Data Processing Slide 28/52
14
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Database Management
System
Ref. Page 330 Chapter 16: Business Data Processing Slide 30/52
15
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Database Models
Ref. Page 330 Chapter 16: Business Data Processing Slide 31/52
Hierarchical Databases
Hierarchical database links its data elements as an inverted
tree structure
Below the single-root data element are subordinate elements,
each of which, in turn, has its own subordinate elements, and
so on
Tree can grow to multiple levels
There may be many children elements under each parent
element, but there can be only one parent element for any
child element
Main limitation of hierarchical database is that it does not
support flexible data access
Applications can access its data elements only by following
paths formed by branches of the tree structure
Ref. Page 330 Chapter 16: Business Data Processing Slide 32/52
16
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
A child element
Ref. Page 330 Chapter 16: Business Data Processing Slide 33/52
Network Databases
Ref. Page 331 Chapter 16: Business Data Processing Slide 34/52
17
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
College
Computer
Courses English Hindi Mathematics
Science
Ref. Page 331 Chapter 16: Business Data Processing Slide 35/52
Relational Databases
Ref. Page 331 Chapter 16: Business Data Processing Slide 36/52
18
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Relational Databases
Ref. Page 331 Chapter 16: Business Data Processing Slide 37/52
Ref. Page 332 Chapter 16: Business Data Processing Slide 38/52
19
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Sample Report
Ref. Page 333 Chapter 16: Business Data Processing Slide 39/52
Object-oriented Databases
Ref. Page 333 Chapter 16: Business Data Processing Slide 40/52
20
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Object-oriented Databases
Ref. Page 334 Chapter 16: Business Data Processing Slide 41/52
Object-Oriented Database
Vehicle VehicleSpecs
Id Length
Color Width
Specifications Height
Manufacturer Engine Type
Fuel Type
Fuel Tank Capacity
No. of Wheels
TwoWheeler FourWheeler
Other details Other details
of the vehicle of the vehicle Company Employee
like with/ like no. of
without gear, doors, seating Name Id
seating capacity, etc. Location Name
capacity, etc. President Age
DomesticCompany ForeignCompany
Ref. Page 334 Chapter 16: Business Data Processing Slide 42/52
21
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Ref. Page 335 Chapter 16: Business Data Processing Slide 43/52
Ref. Page 336 Chapter 16: Business Data Processing Slide 44/52
22
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Creating a Database
Ref. Page 337 Chapter 16: Business Data Processing Slide 45/52
CITY: PUNE
STATE: MH
POSTAL CODE: 411007
Ref. Page 338 Chapter 16: Business Data Processing Slide 46/52
23
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Viewing, Modifying, Deleting, and
Adding Records
Ref. Page 339 Chapter 16: Business Data Processing Slide 47/52
Searching a Database
Ref. Page 340 Chapter 16: Business Data Processing Slide 48/52
24
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Creating Reports
Ref. Page 341 Chapter 16: Business Data Processing Slide 49/52
Ref. Page 342 Chapter 16: Business Data Processing Slide 50/52
25
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Key Words/Phrases
Key Words/Phrases
Query By Example
Query language
Record
Relational database
Report file
Report Generator
Schema
Searching
Secondary key
Sequential file
Sorting
Transaction file
Tuple
26