0% found this document useful (0 votes)
42 views22 pages

12 Computer CHP 1

The document discusses different types of data, information, and operations performed on data. It describes raw facts and figures as data, and processed data as information. Common operations on data include manipulation, calculations, sorting, and summarizing. Traditional file systems faced problems like data redundancy, inconsistency, and lack of sharing.

Uploaded by

Maher Afrasiab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views22 pages

12 Computer CHP 1

The document discusses different types of data, information, and operations performed on data. It describes raw facts and figures as data, and processed data as information. Common operations on data include manipulation, calculations, sorting, and summarizing. Traditional file systems faced problems like data redundancy, inconsistency, and lack of sharing.

Uploaded by

Maher Afrasiab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

DATA BASICS

Q1. What is data and information also discuss different operations performed on
data?
Ans.
Data:
 Raw facts and figures are called data.
 Data is used to perform certain operation in an organization.
 It gives the status of past activities and enables us to make better decisions.
 It is an input for any system.
Example: Data may be numerical like inventory figures, test scores etc. Data may be
non-numerical like your name and address.
Information:
 Processed data is called Information.
 It is usually output of a process and is meaningful.
 It can be reproduced again and again easily.
Example: The grade of a student in a particular subject in a semester precisely gives the
complete information of the performance of a student.
Operations:
 Manipulation of data is called operation.
 In first step, data can be captured from any source.
 Then operations are performed on that data.
 After operations data become information.
 To convert data into information software is used.
Example: Addition of two numbers. Perform any type of sorting or searching.
Data processing activities
 Manipulation of data to achieve required objectives is called data processing.
 Operations carried out on data to convert it into useful information is called data
processing.
 Data processing activities can be divided into three categories.
[Ch#1] Data Basics 2 Computer Science Part-II
1. Data capturing
 Data must be given to the computer before processing.
 Data can be given to the computer in the form of text using keyboard or in some
other shape using some other input device.
2. Data manipulation
 The process to perform various operations on data in order to change its appearance is
called data manipulation.
 Data can be manipulated in the following forms.
 Classification
o Classification includes the division of data in the form of different classes or
groups.
o After this division different codes are assigned to the data.
o These codes can be numeric, alphabetic or alphanumeric.
Example: Students in a college are divided into different sections and the
section name is the code of a particular group/class of students.
 Calculations
o Data can be calculated arithmetically or logically
Example: Addition of two numbers to find the total amount or comparing two
numbers to find which one is the larger.
 Sorting
o This involves arrangement of data into a particular sequence to facilitate
processing.
o Arranged data can be in ascending or descending sequence.
Example: For instance, sorting the banks deposits according to account no
will speed up processing. Sorting can also be performed on names as well as
numbers. The people attending the aerobics class can be stored alphabetically
by last names.
 Summarizing
o A large amount of data can be reduced to a concise, usable form.
Example: A top management report summarizing a company’s accounting
data will help to determine its profit performance.
[Ch#1] Data Basics 2 Computer Science Part-II
Grades of all students in all classes can be summarized by grade point
average. It helps to find the list of those students who deserve dean’s
scholarship.
3. Managing the output results
Output data can be stored for future use or communicated some where for reproduction.
 Storing and retrieval.
o Data can be stored on some storage device e.g. disk, magnetic tape or
microfilm. This stored data can be used in future as per the requirement.
 Communication and reproduction.
o Data can be communicated to one or more than one destinations at the same time.
o To communicate or transfer from one place to another a copy of the data is
made and then transmitted.
Q2. What is a traditional file system? What are the problems faced in traditional
file system? Briefly describe the basic units of information.
Ans.
Traditional File System
 A file system is a method for storing and organizing computer files and the data they contain.
 Files are easily accessed using file system.
 It maintains the physical location of the files on storage device.
 The data was kept in files.
 Each unit of the organization had its own files and each file had a specific set of
programs that were used to manipulate data in that file.
 Each department collects and maintains the required data. This usually resulted in
duplication of data because each record of an employee is maintained by every
department separately.
 Files are stored on storage media.
 Each file consists of records and each record consists of fields. Each field contains
data of one item.
[Ch#1] Data Basics 2 Computer Science Part-II

Problems
 Data redundancy
 Data inconsistency
 Data sharing
 Data dependency
 Data security
Basic Units of Information:
Field
 Each column of the table in relational database is called a field.
 Field is a column heading of a table.
Example: Roll Number, Name or Class can be a column heading if we want to store
student’s information in a table named student.

Roll Number Name Class


1 Adnan ICS

2 Adil FSc

3 Umer I. Com

Record
[Ch#1] Data Basics 2 Computer Science Part-II
 A collection of related fields treated as a single unit is called a record.
 In the following table each row of the table is called a record because it is
representing the related data to a particular student.

Roll Number 1
Name Adnan
Class ICS
DOB 10-03-1992
Phone 417582

File
 A collection of related records treated as a single unit is called a file or data set.
 If we collect the information of the students then it becomes the file of student information.

Roll Number 1
Name Adnan
Roll Number 2
Name Adil
Roll Number 3
Name Fazal
Roll Number 4
Name Gafoor
Class ICS
DOB 03-04-1991
Phone 745241

Q3. How data is stored and retrieved in FMS?


Ans.
File organization on storage media
[Ch#1] Data Basics 2 Computer Science Part-II
Files are organized on storage media for quick and efficient acceess. It is also kept
in view while organizing files on storage media that how efficient it is to create or delete
a file. To achieve these objectives following points are kept in view.
1. Each file is given a unique name and this name represents the type of data in a file.
2. This unique name is used to access the file for additions, deletions or modifications.
3. File is a collection of records and records comprise of fields.
4. Records in a file are placed next to each other. These records may be of fix length
or variable length.
5. Each field is given a unique name.
6. The starting address of each field and its length is used to identify its storage
location.
7. To access the contents of the field its name is used.
[Ch#1] Data Basics 2 Computer Science Part-II
Q.4 Discuss different types of files.
Ans. There are three wys to classify computer files
(1) File Types (Usage Point of View)
(2) File Types (Functional Point of View)
(3) File Types (Storage Point of View)
File Types (Usage Point of View)
o Master File
 These file are latest updated files and never become empty.
 When the information in records is changed it is updated in Master Files.
o Transaction File
 In these files data is kept before processing.
 These can be temporary files.
 Data in these files retained till the master file is updated.
o Backup File
 These are permanent like master files. It is used to keep copy of data.
 These files are created using some software utilities.
 These files are used to protect data.
 It is usually stored on external storage device.
File Types (Functional Point of View)
 According to functional point of view files are given proper names like first .doc.
 The first part is called name of file and second is called extension which is assigned
by the software.
o Program Files
 These files contain software instruction. Program files contain source code or object
code.
Example: Source program files and executable files. The extension of source and
executable files are .com and .exe respectively.
o Data Files
 These files contain data used by program files.
 These files are created by the software being used.
Example: Files having extensions like .dat, .doc, .xls, .mdb etc.

Software File types


Word Processor .doc, .rtf
Spread sheet .xls, .wks
Database .dat, dbf and .mdb
ASCII .txt
Image files .tif, .jpg, .eps, .gif, .bmp
Audio files .wav, .mid
Video files .avi, .mpg
[Ch#1] Data Basics 2 Computer Science Part-II

File Organization (Storage Point of View)


The physical arrangement of records of a file on secondary storage devices is
called file organization. There are a lot of methods to store files on secondary storage. All
the methods have their own advantages and disadvantages. The different type of file
organizations are.
1. Sequential files
2. Direct or random access files
3. Indexed sequential files.
o Sequential Files
 These file store data as it arrives one after another in the sequence.
 These files take more time to store data.
 The data stored in these files are accessed sequentially.
 If you want to go to the last record in a sequential file, you will have to read all
the preceding records before reach.
 The best reason for using sequential files is their degree of portability to other
programs.
 The file organization is very efficient when large number of records are accessed
sequentially.
 The drawback of sequential files is that you only have sequential access to your
data. You access one line at a time, starting with the first line.
o Direct or Random Files
 Record in this type of file is stored on a calculated address.
 Each record is accessed directly.
 These are stored in particular location and each location has a unique address,
data is accessed using these addresses.
 In random files the data is stored exactly as it appears in memory, thus saving
processing time. This organization is suitable for storing data on disk.
 Random access files can be wasteful of disk space.
o Indexed Sequential Files
 The data in this type of file can be accessed sequentially as well as randomly
based on a key value.
 In index sequential file each record is stored along with its location. For these
perpose index is created to store the location of each record.
 Usually the index is created in a new file called index file.
 The index file is updated when a record is added or deleted.
 Its processing is as fast as random files.
[Ch#1] Data Basics 2 Computer Science Part-II
 As records are stored in the form of key-pointer pair in the index file, therefore, it
requires more space on the disk as compared to random files.
Q5. What is a database and DBMS? Give examples of database and facilities of
databases.
Ans.
Databases
 Database is a collection of logically related data stored in an efficient and compact
manner.
 Efficient means stored data can be accessed very easily and quickly. Compact means
that stored data takes up as little space as possible.
 A database is a structured collection of records or data that is stored in a computer so
that a program can consult it to answer queries.
 The records retrieved in response of queries become information that can be used to
make decisions.
 All data of an organization is related and database provides the facility to link related
data.
DBMS:
 The software, which is used to create access and manipulate the database, is called
database management system or DBMS. It controls all the working of the database.
Example:
In a bank there are separate files to keep information about clients and their accounts.
 Client information
 Account information
 Transactions detail
 Loan Details
The users of the database system has the following facilities.
 Add new files to the system.
 Insert new records in the existing files.
 Retrieving data form existing files.
 Deleting data from existing files.
 Removing existing files from the database system.
Q.6 What are the objectives of databases?
Ans.
[Ch#1] Data Basics 2 Computer Science Part-II
 A database is a computerized record keeping system, the main objective of this
system is to make sure that the information is available in compact and efficient
manner.
Objectives of Database
There are three main objectives of the database.
 Data integration
o Data integration is the process of combining data residing at different sources and
providing the user with a unified view of these data.
o It means centralization of information. In manual file system data is stored in
many files at different locations. It is difficult to access data from isolated files in
database are information is logically centralized. It means data is stored on
different computer but it logically appears as a single file.
o Data integration is required because of frequency and the high data volume
increased usage.
 Data integrity
o Data integrity refers to the correctness and consistency of data in a database.
o Data integrity is related with quality of data. When a database contains any error
it losses its integrity.
o Data integrity is expressed in terms of integrity constraints. These are the rules
designed to keep the data accurate and consistent.
o Data integrity is related to security and protection. Security means to protect the
data from unauthorized persons while integrity is related with quality of data.
o Ensuring that the data is "whole" or complete. Data is maintained as a single
copy to be more consistent.
Example:
A social security id belongs to a person. If a social security id is not related to a
person, the social security id is orphan data and data is not complete / whole.
 Data interdependence
o Database allows the organization of data to be changed without the need to make
the program again.
o User can easily change data appearance and data structures without modifying
application programs.
Q7. What are different types of database models? Explain with the help of
diagrams.
Ans.
[Ch#1] Data Basics 2 Computer Science Part-II
Types of Database Models
It is a data structure that a database system uses to store data. There are three
types of Logical Database Models
 Hierarchical Model

o In a hierarchical data model, data are organized into a tree-like structure.

ELECTRONICS

PORTABLE
TELEVISIONS
ELECTRONICS

TUBE LCD PLASMA MP3 PLAYERS CD PLAYERS 2 WAY RADIOS

FLASH

o This type of structure is also referred as an “INVERTED TREE” with the top
referred as “ROOT”. It is a model in which data is organized like an
organizational chart. Each node in a chart represents an entity and its subordinate
entity describes the next level of hierarchical tree.

o The structure allows repeating information using parent/child relationships.


o Each parent can have many children but each child only has one parent.
o All attributes of a specific record are listed under an entity type. In a database, an
entity type is the equivalent of a table; each individual record is represented as a
row and an attribute as a column.
o Entity types are related to each other using 1: N mapping, also known as one-to-
many relationships.
o It cannot represent all the relationship between data. Its disadvantage is that it is
very difficult to modify.
[Ch#1] Data Basics 2 Computer Science Part-II
 Network Model
o This model was developed to overcome the problems of hierarchical model.
o The network model is a database model conceived as a flexible way of
representing objects and their relationships.
Supplier Part Color

ACME ENGINE RED

DELCO WING GREEN


Supplies has color
o Hierarchical model structures data as a tree of records, with each record having
one parent record and many children. The network model allows each record to
have multiple parent and child records, forming a lattice structure.
o In this model any item is directly related to another item. It is slow, complex and
more difficult to maintain.
o It required a complex diagram to present a database. The complexity makes
network database slow and difficult to maintain.

 Relational Model
o Network and hierarchical model were complex and inflexible. It is difficult to
expand or modify the database model. So to over come this problem Dr. E.F.
Codd introduced relational model.
o The relational model represents data in the form of two-dimension tables
(relations).
o Each table represents some real-world person, place, thing, or event about which
information is collected.
o The organization of data into relational tables is known as the logical view of the database.
o The way the database software physically stores the data on a computer disk
system is called the internal view.
[Ch#1] Data Basics 2 Computer Science Part-II

       

       

       
[Ch#1] Data Basics 2 Computer Science Part-II

Q8. Write down the advantages and disadvantages of a Database system.


Ans.
Advantages of Database Systems
 Data Independence
o Physical Implementation of data is separated from application programs.
o DBMS lies between the application program and database. This property allows
users to make changes in database without changing application programs.

 Support Complex Data Relationships


o Complex data structures and database design is sometimes required to store and
access data according to the requirement.
o This complexity enhances the ability to store and retrieve data as per requirement.
 Provides Better Data Security
o Access rights like (read, write, update and delete) can be implemented on any data
item in the database
Example: A program or user can be restricted to change the data of a particular
field. A user or program can be granted to view, update and even delete a
particular data item in a database.
 Minimum Data Redundancy:
o Storing of same data at more than one place in a system is called data redundancy.
In a database system, data is integrated into a single, logical structure. Each fact is
stored in only one place. This minimizing of data redundancy increases data
processing speed. It also ensures correctness of data.
 Improved Data Sharing:
o Database is designed as a shared resource. Authorized users are allowed to use to
database. Thus, many users can access and work on the same data at the same time.
[Ch#1] Data Basics 2 Computer Science Part-II

 Improved Data Consistency:


o By reducing data redundancy, the data inconsistency is reduced. In a database
management system, each data item is stored, as far as possible, at one place only.
 Data Base Backup / Recovery
In information technology, backup refers to making copies of data so that these
additional copies may be used to restore the original after a data loss event.
These additional copies are typically called "backups." Backups are useful primarily
for two purposes:
o To restore a computer to an operational state following a disaster.
o To restore files after they have been accidentally deleted or corrupted.
Recovery is the process of rebuilt the required data by using backup copy.
 Advanced Capabilities
o Advanced capabilities of DBMS include the online and ad-hoc reporting.
o It has the ability to create complex data structures for security purpose.
o It also provides backup/recovery capabilities which are the primary requirements
of a DBMS.
Disadvantages of Database System
 System Overhead
o Hardware cost is an overhead of using a DBMS.
o A speedy system is required to run the DBMS.
o Even to perform a simple job like reading of data from database may require a
series of complex operations.
 Training of Staff
o DBMS are often complex systems so the training for users to use the DBMS is
required.
o Training is required at all levels, including programming, application
development, and database administration.
o The organization has to be paid a lot of amount for the training of staff to run the
DBMS.
o It is possible that in sufficient training lead a team to develop an in efficient
database.
[Ch#1] Data Basics 2 Computer Science Part-II
Example: The use of proper and improper indexes for accessing and searching
the database.
 Wrong Selection of Database Environment Can Cause technical problems.

o A change in structure can be costly if the database is not properly designed.

o At this stage migration of data from one DBMS to another is very difficult.

o In this way data service need to be suspended while migrating.


o Changes in network and hierarchal databases are more costly as compare to
relational database systems.

 Data Must Be Considered as a Corporate Resource

o Data in an organization when matured can be used by other organization.

Example: The defaulters list of bank clients can be used by other banks to
approve or disapprove a loan application.

 Conversion Costs

o The existing or older system of data management is called the legacy system. It
usually consists of a traditional file processing system or an older database
technology. The cost of converting an old data management system to a modern
DBMS is usually large.

 Need for Backup and Recovery

o All operations of organization using a database system depend on accuracy and


continuous availability of data. Therefore, comprehensive procedures are needed
to backup for recovery of database.

 Need of Data Dictionary

o It is a database about data and database structures.


o It holds the name, type, range of values, source, and authorization for access for
each data element in the organization's files and databases.

o It also indicates which application programs use that data so that when a change
in a data structure is contemplated, a list of affected programs can be generated.
[Ch#1] Data Basics 2 Computer Science Part-II
o This data dictionary is an overhead on the system because the system has to
update and maintain the data dictionary during all other system processes.
[Ch#1] Data Basics 2 Computer Science Part-II

Q.9 What is a DBMS? Also discuss its objectives and features.


Ans.
Database Management System
o DBMS is a collection of programs that enables you to store, modify, and extract
information from a database.
o There are many different types of DBMS, ranging from small systems that run on
personal computers to huge systems that run on mainframes. The DBMS is used
for large and medium sized organizations having different types of files for
different purposes.

Objectives of DBMS
 Shareability
o Different programs and people must be able to use the same data at the same time.
o Sharing means that information can be stored once and then retrieved by number
of times by authorized users of database. It reduces storage requirements.
 Availability
Data and Database management system must be easily accessible to every user.
 Evolvability or Data Growth
[Ch#1] Data Basics 2 Computer Science Part-II
DBMS must be able to grow according to the user need. It must also be able to cope
with the advancement in business and technology.
 Data integration
o Data integration is the process of combining data residing at different sources and
providing the user with a unified view of these data.
o It means centralization of information. In manual file system data is stored in
many files at different locations it is difficult to access data from isolated files in
database information is logically centralized. It means data is stored on different
computer but it logically appears as a single file.
 Data integrity
o Ensuring that the data is "whole" or complete. Data is maintained as a single
copy to be more consistent.
o Data integrity refers to the correctness and consistency of data in a database.
o Data integrity is related with quality of data. When a database contains any error
it losses its integrity.
o Data integrity is related to security and protection. Security means to protect the
data from unauthorized persons while integrity is related with quality of data.
o Data integrity is expressed in terms of integrity constraints. These are the rules
designed to keep the data accurate and consistent.
Features of DBMS
 Data Dictionary
o DBMS uses a file to store the data definition or description of the structure of
database is called data dictionary i.e. data about database.
o It holds the name, type, range of values, source, and authorization for access for
each data element in the organization's files and databases.
o It also indicates which application programs use that data so that when a change
in a data structure is implemented, a list of affected programs can be generated.
o The data dictionary may be a stand-alone system or an integral part of the DBMS.
Data integrity and accuracy is better ensured in the later case. Using data
dictionary any information about data and database can be obtained.
 Database Engine:
o Database engine is the heart of DBMS. It stores, retrieves, and updates the data.
Other components of database system rely on the database engine for their
functioning.
 Application Generator:
[Ch#1] Data Basics 2 Computer Science Part-II
o Application generator is a part of DBMS. It consists of tools that are used to
create a complete database management application. A database application is a
collection of queries, forms and reports that are used to input and output data and
perform various data manipulation operations.
 Form Generator:
o Form generator is used to create data input screens. The form generator enables
developers to build forms by dragging and dropping form components such as
text boxes, radio buttons, check boxes, dropdown menus, etc.
 Query Language
o SQL is a language used to insert, update, retrieve and delete any data item from
the database.
o This language is also used to grant access rights on database.
o This is a standard language used with all relational databases.
o The instruction of this language is English like and easily understandable.
 Report Generator
o A program used to create a report in the form of hard/soft copy.
o The report format can be specified by the user.
o This format is very much flexible.
o User can give headings and customize messages on this report.
 Communication and Integration:
o Some database management systems provide special communication and
integration utilities. These are used to import and export data with different
databases running on different computers.
 Utilities
o DBMS utilities are the software programs used to maintain the database by
manipulating the data, records and files.
o Some programs are also used for backup and recovery procedures of the
databases.
 Access Security
o This facility is used to secure the data from unauthorized access.
o This feature makes the data secure and private.
o The data security is maintained by access right like password.
 Backup and Recovery
[Ch#1] Data Basics 2 Computer Science Part-II
o When data is stored in a database there are chances of being lost or destruction by
natural disasters or by some human mistakes.
o The best option in this situation is to take a backup copy of the data.
o And in the case of corruption of data or failure of system database can be
reinstated with backup copy called recovery.
Q.10 What are the objects or components of database system?
Ans. A database is a computerized record keeping system. Its purpose is to maintain
data and make it available when required.
 Data
o Raw facts and figures are called data.
o The data in a database is integrated and shared.
o Integrated means that several files are stored as related files and with minimum
repetition and duplication of data.
o Shared means that the data can be shared among several users. Thus, several users
can use the same data at the same time.
o Ability to maintain integrated and shared data is one of the major advantages of
database systems.
 Hardware
The physical components of a system it includes
o I/O Devices
o Primary Storage
o Secondary Storage Devices
o I/O Channels
o Processor
 Software
It is a set of programs that are used to perform a specific task.
All kind of programs, which include
o User/System Software
 Operating system
 Database
 DBMS
 Application program
o Utilities
[Ch#1] Data Basics 2 Computer Science Part-II
 Backup and recovery
 Personnel
People who involves with the system
o Programmer / Analyst
 Analyst determines the end user requirements about the database system.
 He develops initial structure of the database.
 Programmer then writes application programs with the help of languages,
DBMS and packaged software.
 All operations on data are performed with the help of application program.
o End Users
 It is the person who uses the database management system for his need.
 He must have knowledge of information technology.
 He doesn’t need to have the detail knowledge of the computer system.
 He should be aware of the usage details of the software he intends to use.
o Database Administrator
A database administrator (DBA) is a person who is responsible for the
environmental aspects of a database. In general, these include:
 Recoverability - Creating and testing Backups
 Integrity - Verifying or helping to verify data integrity
 Security - Defining and/or implementing access controls to the data
 Availability - Ensuring maximum uptime
 Performance - Ensuring maximum performance given budgetary constraints
 Development and testing support - Helping programmers and engineers to
efficiently utilize the database.

You might also like