Class XII – Computer Science –
Notes
Practicals
Chapter 01 : Data Basics
1.1 Overview
Q : 01-01-01 : Define Data, Information and Explain Operations on
Data ?
Answer :
Data : Data is a collection of facts, figures and statistics - related to an object, that can
be processed to produce a meaningful information.
Information : The manipulated and processed data is called information e.g., the
percentage of students results. It is an output of a certain process.
Operations : Manipulation of data (after capturing from different sources) to achieve
the required objectives and results. For this purpose, a software (program) is used to
process raw data which is converted to meaningful information.
These are categorized into three basic activities :
Data Capturing : Data must be recorded or captured in some form before it can
be processed.
Data Manipulation : The following operations may then be performed on the
gathered data.
Classifying : Organizing data into classes /groups. Items may be assigned
predetermined codes, they can be numeric, alphabetic or alphanumeric.
Calculations : Arithmetic manipulation of the data.
Sorting : Data is arranged in logical sequence (numerically or
alphabetically).
Summarizing : Masses of data are reduced to a more concise and usable
form.
Managing The Output Results : Once the data is captured & manipulated it
may be :
Storing and Retrieval : Data is retained for future reference. Accessing /
fetching the stored data and / or information is the Retrieve Activity.
Communication and Reproduction : Data may be transferred from one
location or operation to another, for further processing. It is sometimes
necessary to copy or to make duplicate of data, called Reproduction.
1.2 Traditional File System
Q : 01-02-01 : Define and Explain Record and File ?
Answer :
1
,Record : A collection of related fields (facts about something) treated as a single unit
is called a record. Let us see one student’s biographic information (record) :
Roll Number 13-3101
Student Name Muhammad Saleem
Class XI
File : A collection of related records treated as a single unit is called a file or a data
set. Records of all the students together, make a file.
Q : 01-02-02 : Explain Types of File from Usage Point of View ?
Answer :
Master File : These are the latest updated files which never become empty, ever since
they are created. They maintain information that remains constant over a long period
of time.
Transaction File : Files in which data prior to the stage of processing is recorded. It
may be temporary file, retained till the master file is updated.
Backup File : Permanent files, for the purpose of protection of vital data.
Q : 01-02-03 : Explain Types of File from Functional Point of View
?
Answer :
Program Files : These files contain the software instructions i.e. source program files
and executable files. The source program files may have the extension as .cpp and the
executable files as .exe.
Data Files : These files contain data and are created by the software being used. A few
of these are : Word Processor .doc, .rtf (document), Spread Sheet .xls and .wks
(worksheet), Video files .avi, .mpg etc.
Q : 01-02-04 : Explain Types of File from Storage (File
Organization) Point of View ?
Answer :
File Organization (Storage Point of View) :
Sequential Files : Files are stored or created on the storage media in the order the
records are entered i.e., one after another in the sequence.
Direct or Random Files : These files reside on the storage media according to the
address which is calculated against the value of the key field of the record.
Indexed Sequential : The key field of the records (in a file) are stored separately
along with the address of each record. These require relatively more space on the
storage media but the processing is as fast as random / direct files.
1.3 Databases
Q : 01-03-01 : Define & Explain Database ?
Answer :
Database : A database is a collection of logically related data sets or files. For
example;
A bank may have separate files for its clients i.e.
2
, Savings A/C
Automobile loan
Personal loan
Clients biographic information etc.
The bank’s clients / customer database would include records from each of these files.
Using a series of programs, data for any client may be added, retrieved or updated
depending upon the activity at a particular time. The user of the database normally has
following facilities :
Adding new, blank files to the database.
Inserting new data into the existing files.
Retrieving data from existing files.
Updating data in existing files.
Deleting data from existing files.
Removing existing files, empty or otherwise from the database.
Q : 01-03-02 : Explain Database Objectives ?
Answer :
Data Integration : Information is coordinated from different files and operated on a
single file.
Data Integrity : If a data item is contained in more than one file, then all files must be
updated if that item is changed.
Data Interdependence : When the format of a file is changed, then all the programs
have to be changed. However, a database allows the organization of data to be
changed without the need to re-program. It allows programs to be modified without re-
organization of data.
Q : 01-03-03 : Explain Various Types of Database Models ?
Answer :
Hierarchical Model : This Model has the general shape or appearance of an
Organizational Chart. A node on the chart, is subordinate at the next highest level, just
as on an organizational chart, an employee reports to only boss.
Network Model : Similar to Hierarchical model but subordinate entities, depicted by
arrows on the network diagram, may participate in as many subordinate relationships
as desired.
3
, Relational Model : Collection of simple files/Relations (Entities), each of which has
no structural or physical connection like hierarchical or network systems. The various
entities possess the interrelationships as depicted by a network like diagram but these
relationships are based on the data content of the entities involved.
1.4 Database Management System
Q : 01-03-03 : Describe Database Management System (DBMS) and
state Objectives of DBMS ?
Answer :
Database Management System (DBMS) : The data management system (a collection
of programs) which is used for storing and manipulating databases is called database
management system (DBMS). DBMS software (database manager) controls the
overall structure of a database and access to the data itself.
Objectives of Database Management System (DBMS) :
Share Ability : Different people and processes must be able to use the same data at
the same time.
Availability : Both the data and DBMS must be easily accessible to the users.
Evolvability : The ability of the DBMS to change in response to growing user needs
and advancing technology.
Database Integrity : Since data is shared among multiple users, adequate integrity
control measures must be maintained.
Q : 01-03-03 : Describe Advantages of Database Management
System (DBMS) ?
Answer :
Advantages of Database Systems :
Data Independence : Application programs are not aware of the physical
implementation of the data sets. The DBMS sits in between the application programs
and the actual data sets that make up the database.
Support Complex Data Relationships : Fairly complex structures can be designed
4
Notes
Practicals
Chapter 01 : Data Basics
1.1 Overview
Q : 01-01-01 : Define Data, Information and Explain Operations on
Data ?
Answer :
Data : Data is a collection of facts, figures and statistics - related to an object, that can
be processed to produce a meaningful information.
Information : The manipulated and processed data is called information e.g., the
percentage of students results. It is an output of a certain process.
Operations : Manipulation of data (after capturing from different sources) to achieve
the required objectives and results. For this purpose, a software (program) is used to
process raw data which is converted to meaningful information.
These are categorized into three basic activities :
Data Capturing : Data must be recorded or captured in some form before it can
be processed.
Data Manipulation : The following operations may then be performed on the
gathered data.
Classifying : Organizing data into classes /groups. Items may be assigned
predetermined codes, they can be numeric, alphabetic or alphanumeric.
Calculations : Arithmetic manipulation of the data.
Sorting : Data is arranged in logical sequence (numerically or
alphabetically).
Summarizing : Masses of data are reduced to a more concise and usable
form.
Managing The Output Results : Once the data is captured & manipulated it
may be :
Storing and Retrieval : Data is retained for future reference. Accessing /
fetching the stored data and / or information is the Retrieve Activity.
Communication and Reproduction : Data may be transferred from one
location or operation to another, for further processing. It is sometimes
necessary to copy or to make duplicate of data, called Reproduction.
1.2 Traditional File System
Q : 01-02-01 : Define and Explain Record and File ?
Answer :
1
,Record : A collection of related fields (facts about something) treated as a single unit
is called a record. Let us see one student’s biographic information (record) :
Roll Number 13-3101
Student Name Muhammad Saleem
Class XI
File : A collection of related records treated as a single unit is called a file or a data
set. Records of all the students together, make a file.
Q : 01-02-02 : Explain Types of File from Usage Point of View ?
Answer :
Master File : These are the latest updated files which never become empty, ever since
they are created. They maintain information that remains constant over a long period
of time.
Transaction File : Files in which data prior to the stage of processing is recorded. It
may be temporary file, retained till the master file is updated.
Backup File : Permanent files, for the purpose of protection of vital data.
Q : 01-02-03 : Explain Types of File from Functional Point of View
?
Answer :
Program Files : These files contain the software instructions i.e. source program files
and executable files. The source program files may have the extension as .cpp and the
executable files as .exe.
Data Files : These files contain data and are created by the software being used. A few
of these are : Word Processor .doc, .rtf (document), Spread Sheet .xls and .wks
(worksheet), Video files .avi, .mpg etc.
Q : 01-02-04 : Explain Types of File from Storage (File
Organization) Point of View ?
Answer :
File Organization (Storage Point of View) :
Sequential Files : Files are stored or created on the storage media in the order the
records are entered i.e., one after another in the sequence.
Direct or Random Files : These files reside on the storage media according to the
address which is calculated against the value of the key field of the record.
Indexed Sequential : The key field of the records (in a file) are stored separately
along with the address of each record. These require relatively more space on the
storage media but the processing is as fast as random / direct files.
1.3 Databases
Q : 01-03-01 : Define & Explain Database ?
Answer :
Database : A database is a collection of logically related data sets or files. For
example;
A bank may have separate files for its clients i.e.
2
, Savings A/C
Automobile loan
Personal loan
Clients biographic information etc.
The bank’s clients / customer database would include records from each of these files.
Using a series of programs, data for any client may be added, retrieved or updated
depending upon the activity at a particular time. The user of the database normally has
following facilities :
Adding new, blank files to the database.
Inserting new data into the existing files.
Retrieving data from existing files.
Updating data in existing files.
Deleting data from existing files.
Removing existing files, empty or otherwise from the database.
Q : 01-03-02 : Explain Database Objectives ?
Answer :
Data Integration : Information is coordinated from different files and operated on a
single file.
Data Integrity : If a data item is contained in more than one file, then all files must be
updated if that item is changed.
Data Interdependence : When the format of a file is changed, then all the programs
have to be changed. However, a database allows the organization of data to be
changed without the need to re-program. It allows programs to be modified without re-
organization of data.
Q : 01-03-03 : Explain Various Types of Database Models ?
Answer :
Hierarchical Model : This Model has the general shape or appearance of an
Organizational Chart. A node on the chart, is subordinate at the next highest level, just
as on an organizational chart, an employee reports to only boss.
Network Model : Similar to Hierarchical model but subordinate entities, depicted by
arrows on the network diagram, may participate in as many subordinate relationships
as desired.
3
, Relational Model : Collection of simple files/Relations (Entities), each of which has
no structural or physical connection like hierarchical or network systems. The various
entities possess the interrelationships as depicted by a network like diagram but these
relationships are based on the data content of the entities involved.
1.4 Database Management System
Q : 01-03-03 : Describe Database Management System (DBMS) and
state Objectives of DBMS ?
Answer :
Database Management System (DBMS) : The data management system (a collection
of programs) which is used for storing and manipulating databases is called database
management system (DBMS). DBMS software (database manager) controls the
overall structure of a database and access to the data itself.
Objectives of Database Management System (DBMS) :
Share Ability : Different people and processes must be able to use the same data at
the same time.
Availability : Both the data and DBMS must be easily accessible to the users.
Evolvability : The ability of the DBMS to change in response to growing user needs
and advancing technology.
Database Integrity : Since data is shared among multiple users, adequate integrity
control measures must be maintained.
Q : 01-03-03 : Describe Advantages of Database Management
System (DBMS) ?
Answer :
Advantages of Database Systems :
Data Independence : Application programs are not aware of the physical
implementation of the data sets. The DBMS sits in between the application programs
and the actual data sets that make up the database.
Support Complex Data Relationships : Fairly complex structures can be designed
4