Grade 12 Exam  >  Grade 12 Notes  >  Computer Science for Grade 12  >  NCERT Textbook

NCERT Textbook | Computer Science for Grade 12 PDF Download

Download, print and study this document offline
Please wait while the PDF view is loading
 Page 1


7.1 Introduct Ion After learning about importance of data in the 
previous chapter, we need to explore the methods 
to store and manage data electronically. Let us 
take an example of a school that maintains data 
about its students, along with their attendance 
record and guardian details.
The class teacher marks daily attendance of the 
students in the attendance register. The teacher 
records ‘P’ for present or ‘A’ for absent against 
each student’s roll number on each working day. 
If class strength is 50 and total working days in 
“Inconsistency of your mind… Can damage 
your memory… Remove the inconsistent 
data… And keep the original one !!!” 
— Nisarga Jain
In this chapter
 » Introduction 
 » File System 
 » Database Management 
System
 » Relational Data Model
 » Keys in a Relational 
Database 
Database 
Concepts
Chapter 
7 
Chap 7.indd   123 19-Jul-19   3:45:07 PM
Page 2


7.1 Introduct Ion After learning about importance of data in the 
previous chapter, we need to explore the methods 
to store and manage data electronically. Let us 
take an example of a school that maintains data 
about its students, along with their attendance 
record and guardian details.
The class teacher marks daily attendance of the 
students in the attendance register. The teacher 
records ‘P’ for present or ‘A’ for absent against 
each student’s roll number on each working day. 
If class strength is 50 and total working days in 
“Inconsistency of your mind… Can damage 
your memory… Remove the inconsistent 
data… And keep the original one !!!” 
— Nisarga Jain
In this chapter
 » Introduction 
 » File System 
 » Database Management 
System
 » Relational Data Model
 » Keys in a Relational 
Database 
Database 
Concepts
Chapter 
7 
Chap 7.indd   123 19-Jul-19   3:45:07 PM
a month are 26, the teacher needs to record 50 × 26 
records manually in the register every month. As the 
volume of data increases, manual data entry becomes 
tedious. Following are some of the limitations of manual 
record keeping in this example:
1) Entry of student details (Roll number and name) 
in the new attendance register when the student is 
promoted to the next class.
2) Writing student details on each month’s attendance 
page where inconsistency may happen due to 
incorrectly written names, skipped student  
records, etc.
3) Loss of data in case attendance register is lost or 
damaged.
4) Erroneous calculation while consolidating 
attendance record manually.
The office staff also manually maintain Student 
details viz. Roll Number, Name and Date of Birth 
with respective guardian details viz. Guardian name, 
Contact Number and Address. This is required for 
correspondence with guardian regarding student 
attendance and result.
Finding information from a huge volume of papers 
or deleting/modifying an entry is a difficult task in pen 
and paper based approach. To overcome the hassles 
faced in manual record keeping, it is desirable to store 
attendance record and student details on separate data 
files on a computerized system, so that office staff and 
teachers can:
1) Simply copy the student details to the new 
attendance file from the old attendance file when 
students are promoted to next class.
2) Find any data about student or guardian.
3) Add more details to existing data whenever a new 
student joins the school.
4) Modify stored data like details of student or guardian 
whenever required.
5) Remove/delete data whenever a student leaves the 
school.
7.2 FIle Sy Stem A file can be understood as a container to store data in 
a computer. Files can be stored on the storage device 
of a computer system. Contents of a file can be texts, 
computer program code, comma separated values 
Activity 7.1
Visit a few shops 
where records are 
maintained manually 
and identify a few 
limitations of manual 
record keeping faced 
by them. 
Chap 7.indd   124 19-Jul-19   3:45:07 PM
Page 3


7.1 Introduct Ion After learning about importance of data in the 
previous chapter, we need to explore the methods 
to store and manage data electronically. Let us 
take an example of a school that maintains data 
about its students, along with their attendance 
record and guardian details.
The class teacher marks daily attendance of the 
students in the attendance register. The teacher 
records ‘P’ for present or ‘A’ for absent against 
each student’s roll number on each working day. 
If class strength is 50 and total working days in 
“Inconsistency of your mind… Can damage 
your memory… Remove the inconsistent 
data… And keep the original one !!!” 
— Nisarga Jain
In this chapter
 » Introduction 
 » File System 
 » Database Management 
System
 » Relational Data Model
 » Keys in a Relational 
Database 
Database 
Concepts
Chapter 
7 
Chap 7.indd   123 19-Jul-19   3:45:07 PM
a month are 26, the teacher needs to record 50 × 26 
records manually in the register every month. As the 
volume of data increases, manual data entry becomes 
tedious. Following are some of the limitations of manual 
record keeping in this example:
1) Entry of student details (Roll number and name) 
in the new attendance register when the student is 
promoted to the next class.
2) Writing student details on each month’s attendance 
page where inconsistency may happen due to 
incorrectly written names, skipped student  
records, etc.
3) Loss of data in case attendance register is lost or 
damaged.
4) Erroneous calculation while consolidating 
attendance record manually.
The office staff also manually maintain Student 
details viz. Roll Number, Name and Date of Birth 
with respective guardian details viz. Guardian name, 
Contact Number and Address. This is required for 
correspondence with guardian regarding student 
attendance and result.
Finding information from a huge volume of papers 
or deleting/modifying an entry is a difficult task in pen 
and paper based approach. To overcome the hassles 
faced in manual record keeping, it is desirable to store 
attendance record and student details on separate data 
files on a computerized system, so that office staff and 
teachers can:
1) Simply copy the student details to the new 
attendance file from the old attendance file when 
students are promoted to next class.
2) Find any data about student or guardian.
3) Add more details to existing data whenever a new 
student joins the school.
4) Modify stored data like details of student or guardian 
whenever required.
5) Remove/delete data whenever a student leaves the 
school.
7.2 FIle Sy Stem A file can be understood as a container to store data in 
a computer. Files can be stored on the storage device 
of a computer system. Contents of a file can be texts, 
computer program code, comma separated values 
Activity 7.1
Visit a few shops 
where records are 
maintained manually 
and identify a few 
limitations of manual 
record keeping faced 
by them. 
Chap 7.indd   124 19-Jul-19   3:45:07 PM
125
(CSV), etc. Likewise, pictures, audios/videos, web pages 
are also files.
Files stored on a computer can be accessed directly 
and searched for desired data. But to access data of a 
file through software, for example, to display monthly 
attendance report on school website, one has to write 
computer programs to access data from files.
Continuing the example of attendance at school, 
we need to store data about students and attendance 
in two separate files. Table 7.1 shows the contents of 
STUDENT file which has six columns, as detailed below: 
RollNumber  – Roll number of the student
SName  – Name of the student
SDateofBirth –  Date of birth of the student
GName  –  Name of the guardian
GPhone  – Phone number of the student guardian
GAddress  –  Address of the guardian of the student
Table 7.1 STUDENT file maintained by office staff
Roll
Number
SName
SDateof 
Birth
GName GPhone GAddress
1 Atharv Ahuja 2003-05-15 Amit Ahuja 5711492685 G-35, Ashok Vihar, 
Delhi
2 Daizy Bhutia 2002-02-28 Baichung 
Bhutia
7110047139 Flat no. 5, Darjeeling 
Appt., Shimla
3 Taleem Shah 2002-02-28 Himanshu Shah 9818184855 26/77, West Patel 
Nagar, Ahmedabad
4 John Dsouza 2003-08-18 Danny Dsouza S -13, Ashok Village, 
Daman
5 Ali Shah 2003-07-05 Himanshu Shah 9818184855 26/77, West Patel 
Nagar, Ahmedabad
6 Manika P. 2002-03-10 Sujata P. 7802983674 HNO-13, B- block, Preet 
Vihar, Madurai
Table 7.2 shows another file called ATTENDANCE 
which has four columns, as detailed below: 
AttendanceDate  – Date for which attendance was  
          marked
RollNumber  –  Roll number of the student
SName  –  Name of the student
AttendanceStatus – Marked as P (present) or A (absent)
Chap 7.indd   125 19-Jul-19   3:45:07 PM
Page 4


7.1 Introduct Ion After learning about importance of data in the 
previous chapter, we need to explore the methods 
to store and manage data electronically. Let us 
take an example of a school that maintains data 
about its students, along with their attendance 
record and guardian details.
The class teacher marks daily attendance of the 
students in the attendance register. The teacher 
records ‘P’ for present or ‘A’ for absent against 
each student’s roll number on each working day. 
If class strength is 50 and total working days in 
“Inconsistency of your mind… Can damage 
your memory… Remove the inconsistent 
data… And keep the original one !!!” 
— Nisarga Jain
In this chapter
 » Introduction 
 » File System 
 » Database Management 
System
 » Relational Data Model
 » Keys in a Relational 
Database 
Database 
Concepts
Chapter 
7 
Chap 7.indd   123 19-Jul-19   3:45:07 PM
a month are 26, the teacher needs to record 50 × 26 
records manually in the register every month. As the 
volume of data increases, manual data entry becomes 
tedious. Following are some of the limitations of manual 
record keeping in this example:
1) Entry of student details (Roll number and name) 
in the new attendance register when the student is 
promoted to the next class.
2) Writing student details on each month’s attendance 
page where inconsistency may happen due to 
incorrectly written names, skipped student  
records, etc.
3) Loss of data in case attendance register is lost or 
damaged.
4) Erroneous calculation while consolidating 
attendance record manually.
The office staff also manually maintain Student 
details viz. Roll Number, Name and Date of Birth 
with respective guardian details viz. Guardian name, 
Contact Number and Address. This is required for 
correspondence with guardian regarding student 
attendance and result.
Finding information from a huge volume of papers 
or deleting/modifying an entry is a difficult task in pen 
and paper based approach. To overcome the hassles 
faced in manual record keeping, it is desirable to store 
attendance record and student details on separate data 
files on a computerized system, so that office staff and 
teachers can:
1) Simply copy the student details to the new 
attendance file from the old attendance file when 
students are promoted to next class.
2) Find any data about student or guardian.
3) Add more details to existing data whenever a new 
student joins the school.
4) Modify stored data like details of student or guardian 
whenever required.
5) Remove/delete data whenever a student leaves the 
school.
7.2 FIle Sy Stem A file can be understood as a container to store data in 
a computer. Files can be stored on the storage device 
of a computer system. Contents of a file can be texts, 
computer program code, comma separated values 
Activity 7.1
Visit a few shops 
where records are 
maintained manually 
and identify a few 
limitations of manual 
record keeping faced 
by them. 
Chap 7.indd   124 19-Jul-19   3:45:07 PM
125
(CSV), etc. Likewise, pictures, audios/videos, web pages 
are also files.
Files stored on a computer can be accessed directly 
and searched for desired data. But to access data of a 
file through software, for example, to display monthly 
attendance report on school website, one has to write 
computer programs to access data from files.
Continuing the example of attendance at school, 
we need to store data about students and attendance 
in two separate files. Table 7.1 shows the contents of 
STUDENT file which has six columns, as detailed below: 
RollNumber  – Roll number of the student
SName  – Name of the student
SDateofBirth –  Date of birth of the student
GName  –  Name of the guardian
GPhone  – Phone number of the student guardian
GAddress  –  Address of the guardian of the student
Table 7.1 STUDENT file maintained by office staff
Roll
Number
SName
SDateof 
Birth
GName GPhone GAddress
1 Atharv Ahuja 2003-05-15 Amit Ahuja 5711492685 G-35, Ashok Vihar, 
Delhi
2 Daizy Bhutia 2002-02-28 Baichung 
Bhutia
7110047139 Flat no. 5, Darjeeling 
Appt., Shimla
3 Taleem Shah 2002-02-28 Himanshu Shah 9818184855 26/77, West Patel 
Nagar, Ahmedabad
4 John Dsouza 2003-08-18 Danny Dsouza S -13, Ashok Village, 
Daman
5 Ali Shah 2003-07-05 Himanshu Shah 9818184855 26/77, West Patel 
Nagar, Ahmedabad
6 Manika P. 2002-03-10 Sujata P. 7802983674 HNO-13, B- block, Preet 
Vihar, Madurai
Table 7.2 shows another file called ATTENDANCE 
which has four columns, as detailed below: 
AttendanceDate  – Date for which attendance was  
          marked
RollNumber  –  Roll number of the student
SName  –  Name of the student
AttendanceStatus – Marked as P (present) or A (absent)
Chap 7.indd   125 19-Jul-19   3:45:07 PM
126
7.2.1 Limitations of a File System
File system becomes difficult to handle when number of 
files increases and volume of data also grows. Following 
are some of the limitations of file system:
(A)	 Difficulty 	 in	 Access
Files themselves do not provide any mechanism to 
retrieve data. Data maintained in a file system are 
accessed through application programs. While writing 
such programs, the developer may not anticipate all 
the possible ways in which data may be accessed. So, 
sometimes it is difficult to access data in the required 
format and one has to write application program to 
access data. 
(B)	 Data	 Redundancy
Redundancy means same data are duplicated in 
different places (files). In our example, student names 
are maintained in both the files. Besides, in Table 7.1, 
students with roll numbers 3 and 5 have same guardian 
name and therefore same guardian name is maintained 
twice. Both these are examples of redundancy which is 
difficult to avoid in a file system. Redundancy leads to 
excess storage use and may cause data inconsistency 
also.
(C)	 Data	 Inconsistency
Data inconsistency occurs when same data maintained 
in different places do not match. If a student wants to 
get changed the spelling of her name, it needs to be 
Table 7.2 ATTENDANCE file maintained by class teacher
AttendanceDate RollNumber SName AttendanceStatus
2018-09-01 1 Atharv Ahuja P
2018-09-01 2 Daizy Bhutia P
2018-09-01 3 Taleem Shah A
2018-09-01 4 John Dsouza P
2018-09-01 5 Ali Shah A
2018-09-01 6 Manika P. P
2018-09-02 1 Atharv Ahuja P
2018-09-02 2 Daizy Bhutia P
2018-09-02 3 Taleem Shah A
2018-09-02 4 John Dsouza A
2018-09-02 5 Ali Shah P
2018-09-02 6 Manika P. P
Chap 7.indd   126 19-Jul-19   3:45:07 PM
Page 5


7.1 Introduct Ion After learning about importance of data in the 
previous chapter, we need to explore the methods 
to store and manage data electronically. Let us 
take an example of a school that maintains data 
about its students, along with their attendance 
record and guardian details.
The class teacher marks daily attendance of the 
students in the attendance register. The teacher 
records ‘P’ for present or ‘A’ for absent against 
each student’s roll number on each working day. 
If class strength is 50 and total working days in 
“Inconsistency of your mind… Can damage 
your memory… Remove the inconsistent 
data… And keep the original one !!!” 
— Nisarga Jain
In this chapter
 » Introduction 
 » File System 
 » Database Management 
System
 » Relational Data Model
 » Keys in a Relational 
Database 
Database 
Concepts
Chapter 
7 
Chap 7.indd   123 19-Jul-19   3:45:07 PM
a month are 26, the teacher needs to record 50 × 26 
records manually in the register every month. As the 
volume of data increases, manual data entry becomes 
tedious. Following are some of the limitations of manual 
record keeping in this example:
1) Entry of student details (Roll number and name) 
in the new attendance register when the student is 
promoted to the next class.
2) Writing student details on each month’s attendance 
page where inconsistency may happen due to 
incorrectly written names, skipped student  
records, etc.
3) Loss of data in case attendance register is lost or 
damaged.
4) Erroneous calculation while consolidating 
attendance record manually.
The office staff also manually maintain Student 
details viz. Roll Number, Name and Date of Birth 
with respective guardian details viz. Guardian name, 
Contact Number and Address. This is required for 
correspondence with guardian regarding student 
attendance and result.
Finding information from a huge volume of papers 
or deleting/modifying an entry is a difficult task in pen 
and paper based approach. To overcome the hassles 
faced in manual record keeping, it is desirable to store 
attendance record and student details on separate data 
files on a computerized system, so that office staff and 
teachers can:
1) Simply copy the student details to the new 
attendance file from the old attendance file when 
students are promoted to next class.
2) Find any data about student or guardian.
3) Add more details to existing data whenever a new 
student joins the school.
4) Modify stored data like details of student or guardian 
whenever required.
5) Remove/delete data whenever a student leaves the 
school.
7.2 FIle Sy Stem A file can be understood as a container to store data in 
a computer. Files can be stored on the storage device 
of a computer system. Contents of a file can be texts, 
computer program code, comma separated values 
Activity 7.1
Visit a few shops 
where records are 
maintained manually 
and identify a few 
limitations of manual 
record keeping faced 
by them. 
Chap 7.indd   124 19-Jul-19   3:45:07 PM
125
(CSV), etc. Likewise, pictures, audios/videos, web pages 
are also files.
Files stored on a computer can be accessed directly 
and searched for desired data. But to access data of a 
file through software, for example, to display monthly 
attendance report on school website, one has to write 
computer programs to access data from files.
Continuing the example of attendance at school, 
we need to store data about students and attendance 
in two separate files. Table 7.1 shows the contents of 
STUDENT file which has six columns, as detailed below: 
RollNumber  – Roll number of the student
SName  – Name of the student
SDateofBirth –  Date of birth of the student
GName  –  Name of the guardian
GPhone  – Phone number of the student guardian
GAddress  –  Address of the guardian of the student
Table 7.1 STUDENT file maintained by office staff
Roll
Number
SName
SDateof 
Birth
GName GPhone GAddress
1 Atharv Ahuja 2003-05-15 Amit Ahuja 5711492685 G-35, Ashok Vihar, 
Delhi
2 Daizy Bhutia 2002-02-28 Baichung 
Bhutia
7110047139 Flat no. 5, Darjeeling 
Appt., Shimla
3 Taleem Shah 2002-02-28 Himanshu Shah 9818184855 26/77, West Patel 
Nagar, Ahmedabad
4 John Dsouza 2003-08-18 Danny Dsouza S -13, Ashok Village, 
Daman
5 Ali Shah 2003-07-05 Himanshu Shah 9818184855 26/77, West Patel 
Nagar, Ahmedabad
6 Manika P. 2002-03-10 Sujata P. 7802983674 HNO-13, B- block, Preet 
Vihar, Madurai
Table 7.2 shows another file called ATTENDANCE 
which has four columns, as detailed below: 
AttendanceDate  – Date for which attendance was  
          marked
RollNumber  –  Roll number of the student
SName  –  Name of the student
AttendanceStatus – Marked as P (present) or A (absent)
Chap 7.indd   125 19-Jul-19   3:45:07 PM
126
7.2.1 Limitations of a File System
File system becomes difficult to handle when number of 
files increases and volume of data also grows. Following 
are some of the limitations of file system:
(A)	 Difficulty 	 in	 Access
Files themselves do not provide any mechanism to 
retrieve data. Data maintained in a file system are 
accessed through application programs. While writing 
such programs, the developer may not anticipate all 
the possible ways in which data may be accessed. So, 
sometimes it is difficult to access data in the required 
format and one has to write application program to 
access data. 
(B)	 Data	 Redundancy
Redundancy means same data are duplicated in 
different places (files). In our example, student names 
are maintained in both the files. Besides, in Table 7.1, 
students with roll numbers 3 and 5 have same guardian 
name and therefore same guardian name is maintained 
twice. Both these are examples of redundancy which is 
difficult to avoid in a file system. Redundancy leads to 
excess storage use and may cause data inconsistency 
also.
(C)	 Data	 Inconsistency
Data inconsistency occurs when same data maintained 
in different places do not match. If a student wants to 
get changed the spelling of her name, it needs to be 
Table 7.2 ATTENDANCE file maintained by class teacher
AttendanceDate RollNumber SName AttendanceStatus
2018-09-01 1 Atharv Ahuja P
2018-09-01 2 Daizy Bhutia P
2018-09-01 3 Taleem Shah A
2018-09-01 4 John Dsouza P
2018-09-01 5 Ali Shah A
2018-09-01 6 Manika P. P
2018-09-02 1 Atharv Ahuja P
2018-09-02 2 Daizy Bhutia P
2018-09-02 3 Taleem Shah A
2018-09-02 4 John Dsouza A
2018-09-02 5 Ali Shah P
2018-09-02 6 Manika P. P
Chap 7.indd   126 19-Jul-19   3:45:07 PM
127
changed in SName column in both the files. Likewise, if 
a student leaves school, the details need to be deleted 
from both the files. As the files are being maintained by 
different people, the changes may not happen in one of 
the files. In that case, the student name will be different 
(inconsistent) in both the files. 
(D)	 Data 	 Isolation 	
Both the files presented at Table 7.1 (STUDENT) and at 
Table 7.2 (ATTENDANCE) are related to students. But 
there is no link or mapping between them. The school 
will have to write separate programs to access these two 
files. This is because data mapping is not supported in 
file system. In a more complex system where data files 
are generated by different person at different times, files 
being created in isolation may be of different formats. 
In such case, it is difficult to write new application 
programs to retrieve data from different files maintained 
at multiple places, as one has to understand the 
underlying structure of each file as well.
(E) Data Dependence
Data are stored in a specific format or structure in a 
file. If the structure or format itself is changed, all the 
existing application programs accessing that file also 
need to be change. Otherwise, the programs may not 
work correctly. This is data dependency. Hence, updating 
the structure of a data file requires modification in all 
the application programs accessing that file.
(F)	 Controlled 	Data	Sharing
There can be different category of users like teacher, 
office staff and parents. Ideally, not every user should 
be able to access all the data. As an example, guardians 
and office staff can only see the student attendance data 
but should not be able to modify/delete it. It means 
these users should be given limited access (read only) 
to the ATTENDANCE file. Only the teacher should be 
able to update the attendance data. It is very difficult to 
enforce this kind of access control in a file system while 
accessing files through application programs.
7.3 d ataba Se m anagement Sy Stem Limitations faced in file system can be overcome by 
storing the data in a database where data are logically 
related. We can organise related data in a database so 
that it can be managed in an efficient and easy way.
n ote S
Chap 7.indd   127 19-Jul-19   3:45:07 PM
Read More
1 videos|25 docs|18 tests

Top Courses for Grade 12

1 videos|25 docs|18 tests
Download as PDF
Explore Courses for Grade 12 exam

Top Courses for Grade 12

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Semester Notes

,

Free

,

Sample Paper

,

Summary

,

shortcuts and tricks

,

past year papers

,

NCERT Textbook | Computer Science for Grade 12

,

MCQs

,

practice quizzes

,

Previous Year Questions with Solutions

,

pdf

,

Important questions

,

NCERT Textbook | Computer Science for Grade 12

,

Viva Questions

,

video lectures

,

NCERT Textbook | Computer Science for Grade 12

,

ppt

,

Exam

,

study material

,

Extra Questions

,

mock tests for examination

,

Objective type Questions

;