Prenentation 1
Prenentation 1
Data Basics
Data
• Collection of facts and figures related to an object Object can be person,
event or anything
about which data is
• Data may consist of text, numbers, images, sound and videos collected
• The data of student may consist of Roll Number, Student Name, and marks of
different subjects
Information
• Processed data
• Organized
• Meaningful
• Useful
• Used for making decisions
• Data is used as input for processing and information is the output of this processing
Example
• The data of student can be processed to produce useful information such as:
• Total Marks
• Grade
• Find the number of passed and failed students etc.
Difference between Data and Information
Data Information
• Collection of raw facts and figures • Processed form of data
• Used as input in the computer • Output of computer
• Huge in its volume • Short in its volume
• Difficult or even impossible to reproduce. For •
Easier to reproduce. For example, number of
example, it is very hard to reproduce the graduate citizens can be recalculated from
data of census if it is lost the stored data
Activities
• Storage - The process of retaining data on storage media such as hard disk for
future use
• Example - The student data is stored on the hard disk
• Calculation - The process of accessing or fetching the stored data
• Example - Student data can be retrieved from the hard disk any time to prepare result card
• Communication - The process of transferring data from one location to
another
• Example - The result can be sent to the students via email
• Reproduction - The process of copying or duplicating data
• Data can be reproduced if different users need data at different locations
Field, Record and File
Field
• A combination of one or more characters
• Represents Smallest unit of data
• Name of each field in a record is unique
• Each field contains one specific piece of information
• Example - The EmployeeID, Name, HireDate, JobTitle and Phone
Record
• A collection of related fields used as single unit
• Example - An Employee’s record includes a set of fields that contains EmployeeID,
• Files are stored on different storage media such as hard disk, USB flash drive
or
optical disc (CDs and DVDs)
Example
•Employee file may contain the
records of hundreds of
Employees
File Types from Usage point of
1.View
Master File
• Used to store the information that remains constant for a long period of time
• Example – A college maintains a master file of all students
• It is updated when any change in its contents is required
• These files are never empty since they are created
2. Transaction File
• Used to store the input data before processing
• It may be temporary file
• The data in transaction files is used to update the master files
• It may exist until the master file is updated
• It may also be used to maintain a permanent record of data about transaction
• Example – A transaction file can be used to store the fee deposited by the student
File Types from Usage point of
3.View
Backup File
• Used to take the backup of important data
• Permanent file
• The data can be recovered from backup files if any data file is lost or damaged
• Backup files are mostly created by using specific software (utility program)
File Types from Functional Point of View
• A file consists of file name and file extension
1. Program File
• Contains the software instructions
1. Sequential Files
• Records are stored on the storage media in a sequence
• Records can be retrieved only in sequence in which they were stored
• Major disadvantage is very slow access time for a particular record
File Organization
2. Direct or Random Files
• Records are not stored in a particular sequence
• The address or location is calculated against the value of the key field of the record
• Synonym problem→ If the same address is calculated to store two or more records
• Storage media for direct file organization are hard disk , optical discs( CDs, DVDs)
File Organization
3. Indexed Sequential Files
• Records are stored in ascending or descending order based on value called key
• An index value is generated for each key and mapped with the record
• Index refers to the location or address on a disk where a record is stored
• The index is stored in a file called index file
• Index file contains the value of :
• Each key field
• Disk address of record with corresponding key field
• Index file is updated whenever a record is added or deleted from the file
• Main advantage
• Allows for both random and sequential processing
• Main disadvantages
• Extra space is required to store indexes
• Extra time necessary to access and maintain indexes
File Processing System
• This system is used by different organization to store and manage data
• Each department has its own set of data files and application program
• Each program defines and manages its own data
• Every Process generate its separate files and does not communicate with each other
Example
Problems in File Processing
System
Data Redundancy Duplication of data in multiple files
Example
Suppose that two files are used in a college. The Students file contains the data such
as RollNo, Name, Address, Phone and other details of the students. The Library file
contains the same data of the students who borrow books from library along with the
information about the book. The data of one student appears in two files. It causes
wastage of storage and creates many problems.
Problems in File Processing
System
Data Inconsistency Two files many contain different data about the same thing.
Example
The address of a student must be updated in all files if any change occurs. It is
possible that it is changed in Students file but not in Library file. The data becomes
inconsistent in this situation.
Problems in File Processing
System
Program Dependence The application program has to be changed if the format of file
is changed.
Example
If there is a change in the length of postal code, it requires change in the program. The
changes may be costly to implement.
Problems in File Processing
System
Combined reports are very difficult to display as data is scattered in
Lack of Flexibility
different files.
Example
Suppose a students report is required in the college. The data will be collected from
various files to prepare the report. It requires a lot of time and effort to write program
for such types of reports in file processing system.
Problems in File Processing
System
Data Integrity Problem Integrity means reliability and accuracy of data
Example
RollNo and Marks of the students should be numeric value. It is very difficult to apply
these constraints on files in file processing system.
Problems in File Processing
System
Lack of Data Security It is not possible to define different access levels for different users.
Example
A data entry operator should only be allowed to enter data. The chairman of the
organization should be able to access or delete the data completely. Such types of
security options are not available in file management system.
Problems in File Processing
System
Limited Data Sharing The file processing system provides a limited data sharing
It is very difficult for one application program to access the data from a
file that is created by other application program.
The file processing system also provides very limited data sharing among
different users.