SlideShare a Scribd company logo
1
Chapter # 8
How Data is stored
DATABASE
2
Items
• An item of data means the smallest piece
of data that may be a single name or a
single number.
• Field
• A field is a area of a record reserved for
one particular type of data.
• Each field contain one or more data items.
3
Record
• Record is a group of related items of data which
together can be treated as a unit.
• The records are similar to one another in the type
of data.
• Files
• A file is organized collection of related records.
• In computing a file is usually on backing store.
4
Examples
Roll
No
Name Phone# DOB
1 Ali 042-78888 12/12/98
2 Ahmed 544545 09/4/97
FIELD
RECORD
ITEM
A Students Files
5
Reasons for using files
• In any situations requiring a
permanent source of data.
• In computer when the main store is
so small for amount of data being
processed.
6
Key field
• A key field is field that may be used to
search a file.
• It is always useful to have one field which
is unique to a particular record.
• Admission form no of each student.
• With the library system, the key field
would be the number given to the book
7
Fixed and variable length
fields
• Fields may be of fixed or variable length.
• If the fields are of fixed length then a given
field in a record has a set number of characters
positions reserved for it.
• We specify how long each field is going to be
when we set up the structure of a database
• If the fields are of variable length, the number
of characters in each is not determined
beforehand.
8
Advantages of variable
over fixed length
• There is no waste of storage space
• Advantages of fixed over variable length
• Computer operations such as searching can
be carried out quickly.
• Allocation of storage space is more
straight forward
• Updating the file is much easier
9
Types of Files
• 1.Master file
• Is a file used as a reference for a
particular computer application
• It may be updated when necessary
• It is the most complete and up-to date
version of a file.
• If the master file is lost or damaged and
it is only copy, the whole system will break
down.
10
Transaction file
• Is a file of temporary data which has been
prepared in order to carry out a
processing operation with the data on a
master file
• It is used to update master file.
• A transaction is a piece of a business.
• Transaction can occur in any order, so it is
necessary to sort a transaction file into
the same order as the master file
11
Backup or security files
• Backup copies of files are in kept in case the
original file is damaged or lost or cannot be used
• The importance of master file, back up copies of
it should be taken at regular intervals in case it is
stolen, lost or corrupted.
• Looking after your disks is not enough you should
always keep backup copies of all important data.
12
Transaction log files
• Are bits of business such as placing
an order, updating the stock, making
a payment.
13
File Access Methods
• Serial access
• Sequential access
• Random Access
14
Serial access
• To read a serial file ,a computer has to
read each record until it reaches the one
required.
• The records do not follow each other in
any particular order.
• So if another record needs to be added it
can just be added to the end of the file.
15
Sequential Access
• Access to a file is sequential when records
can only be written to or read from it in
order one after another.
• So if just one record is required then
method is slow but if all the records are
required then it becomes fast
• Sequential files can be stored on
• Magnetic tape
16
Direct or Random Access
• When any record can be accessed
without having to access other
records first
• It store data on direct access.
• You can access both sequential and
random files directly
17
Advantages of direct access
over sequential access
• Selected records can be accessed far
more quickly from direct access files.
• Records can be accessed in any chosen
order.
• Records do not have to be put into any
particular order before the file is created
18
Advantages of Sequential
access over direct access
• Sequential files can be stored on
most media including magnetic tape
,paper tape and punched card
• For the programmer ; it is usually
easier to write programs to handle
sequential files
19
Factors for choice of
method
• How may records are to accessed. If the records
are to be accessed singly or few then direct
access is used.
• How large the file is. If a file is small the time
delay in searching it is not important therefore a
sequential file is acceptable.
• Sequential files is often suitable for batch
applications.
• The type of storage medium being used. If
magnetic tape is to used then files may have
sequentail.
20
Files Systems
• Manual File System
• Mechanical File System
• Electronic File Systems
21
Manual File
• File is Processed manually without using
any machine or tool.
Problems:
• Accessing the same information in same of
two people can not possible.
• If a file is placed in wrong place then
finding it again can be problem
• Updating the file is difficult.
22
Mechanical File System
• File is processed by using different
device like typewriters, mechanical
printers.
• That method is faster and more
accurate than manual file.
23
Electronic file
• File is processed through computers
• Files and set of instructions are
given to the computer as input and
computer automatically processed
that file.
24
Advantages of
computerized system
• Information is stored only once, since
most database software allows you to
access information from several files.
• Files can be linked together which means
that if you update one of the files.
• Changing is in easy way
• Data loss is less chance
• Validations checks may be made on the
data as it is being entered into database.
25
Disadvantages
• If the computer breaks down you are
not able to access the details.
• It is easy to copy computer file so
there is a need to protect sensitive
data.
• Training is needed to use the system
26
Data base
• Database is organized collection of
information or data.
• Collection of related data stored in
an efficient and compact manner.
27
Examples
• ATM
• NADRA
• Flight Details
• Hotmail Or Yahoo Or Google
• Library in Schools
28
Types of Database
• Centralized database
• Distributed database
29
Centralized database
• Complete data is located at a single
computer and all the users access
this single database.
• Its an efficient way to access and
update data.
• Used in computer network
environment.
30
Distributed database
• Is a single database which is spread
physically across multiple computers
over wide area network .
• It may be
• Homogenous
• Heterogeneous
31
DBMS
• Database management system is
computerized record keeping system.
• Is a collection of programs, which are
used to define ,create and maintain
database.
32
Database System of a
School
Students
Data
DBMS
Admission
program
Schedule
Program
33
Common File processes
• File updating
• Insertions
• Deletions
• Amendments
34
File Updating
• Involves bringing a file up-to-date
with any changes that have occurred.
• There are various process that can
take place during updating.
35
Insertions
• A new entry in the file.
• Suppose we had a file containing the
details of pupils in a school.
• A new pupil may have joined the
school and so that pupil’s details will
need to be added to the file.
36
Deletions
• A delete record in the file.
• A pupil could have moved to a new
school so that the pupil’s detail will
need to be removed from the file.
37
Amendments
• Some changes occur in the field of
file.
• A pupil has moved house so the
address field needs changing.
38
File Manipulations
• Sorting
• Merging
39
Sorting
• Some time a field need to be sorted
in particular order.
• It may be
• Ascending
• Descending
40
Merging
• Sometimes we want to combine the
contents of two files to form a single
• The process of combining the files is
called merging.
• If the two files to be merged are on
magnetic tape then we must sort the tapes
into order before merging them.
• Merging is very important when we want to
divide the work.

More Related Content

PDF
Chap01 (ics12)
PPT
File organisation in system analysis and design
PPT
Fileorganization AbnMagdy
PPT
File organisation
PPT
File organisation
PPTX
Concept of computer files
PPT
Ie Storage, Multimedia And File Organization
PDF
itft-File design
Chap01 (ics12)
File organisation in system analysis and design
Fileorganization AbnMagdy
File organisation
File organisation
Concept of computer files
Ie Storage, Multimedia And File Organization
itft-File design

What's hot (20)

PPT
File organization
PPTX
2.7 use of ict in data management
PPT
File organization
PPT
Database (IT) Lecture Slide
PPTX
overview of storage and indexing BY-Pratik kadam
PPTX
2.7 Use of ICT in Data Management
PPTX
Introduction to data management, terminologies and use of data management pla...
DOCX
File organization in database
PPT
Lecture #1 Introduction
PPTX
Concept of computer files for Grade 12 learners
PPTX
Oceangraphic data formats
PPT
Fundamental File Processing Operations
PPTX
CS3270 - DATABASE SYSTEM - Lecture (1)
PPS
Files Management
PPTX
PPT
Database Systems
PDF
Database Systems - Lecture Week 1
PPTX
File Organization
PPT
Ch09 records management
File organization
2.7 use of ict in data management
File organization
Database (IT) Lecture Slide
overview of storage and indexing BY-Pratik kadam
2.7 Use of ICT in Data Management
Introduction to data management, terminologies and use of data management pla...
File organization in database
Lecture #1 Introduction
Concept of computer files for Grade 12 learners
Oceangraphic data formats
Fundamental File Processing Operations
CS3270 - DATABASE SYSTEM - Lecture (1)
Files Management
Database Systems
Database Systems - Lecture Week 1
File Organization
Ch09 records management
Ad

Similar to Ch 8 data base (20)

PPTX
virtual_memory (3).pptx
PPTX
Backups in computer programming and.pptx
PPTX
File management in OS
PPTX
DBMS_UNIT 5 Notes.pptx
PPT
file management
PPTX
FILE SYSTEM VS DBMS ppt.pptx
PPTX
Data Analytics: HDFS with Big Data : Issues and Application
PPTX
File system and Deadlocks
PPTX
Unit-1-Lecture-9.pptx file structure semester
PPTX
File Management
PPTX
File System.pptx
PPTX
Storage devices and media presentation.pptx
PPTX
UNIT 4-UNDERSTANDING VIRTUAL MEMORY.pptx
PDF
UNIT machine learning unit 1,algorithm pdf
PPT
File Management
PDF
File system in operating system e learning
PPT
dbms.ppt
PPT
What is Database Management System
PPTX
Operating system note of File System chapter .pptx
virtual_memory (3).pptx
Backups in computer programming and.pptx
File management in OS
DBMS_UNIT 5 Notes.pptx
file management
FILE SYSTEM VS DBMS ppt.pptx
Data Analytics: HDFS with Big Data : Issues and Application
File system and Deadlocks
Unit-1-Lecture-9.pptx file structure semester
File Management
File System.pptx
Storage devices and media presentation.pptx
UNIT 4-UNDERSTANDING VIRTUAL MEMORY.pptx
UNIT machine learning unit 1,algorithm pdf
File Management
File system in operating system e learning
dbms.ppt
What is Database Management System
Operating system note of File System chapter .pptx
Ad

More from Khan Yousafzai (20)

PPT
14 data logging
PPT
09.1 types of computer operation
PPT
8.2 system analysis and design
PPT
8.1 alogorithm & prolem solving
PPT
Ch 26 the internet
PPT
Ch 22 the electronic office
PPT
Ch 21 computer and your health
PPT
Ch 19. social and economic effects of it
PPT
Ch 17 data protections act
PPT
Ch 16 system security
PPT
Ch 15 .networks and communications
PPT
Ch 14. weather forecasting ( application of data logging)
PPT
Ch 13 system analysis
PPT
Ch 12 describing information system
PPT
Ch 11 ways of presenting data
PPT
Ch 9 types of computer operations
PPT
Ch 6 collecting your data
PPT
Ch10 data transfer
PPT
23 simulations
PPT
18 computers and the law
14 data logging
09.1 types of computer operation
8.2 system analysis and design
8.1 alogorithm & prolem solving
Ch 26 the internet
Ch 22 the electronic office
Ch 21 computer and your health
Ch 19. social and economic effects of it
Ch 17 data protections act
Ch 16 system security
Ch 15 .networks and communications
Ch 14. weather forecasting ( application of data logging)
Ch 13 system analysis
Ch 12 describing information system
Ch 11 ways of presenting data
Ch 9 types of computer operations
Ch 6 collecting your data
Ch10 data transfer
23 simulations
18 computers and the law

Recently uploaded (20)

PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
RMMM.pdf make it easy to upload and study
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Cell Types and Its function , kingdom of life
PPTX
Pharma ospi slides which help in ospi learning
PPTX
master seminar digital applications in india
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Lesson notes of climatology university.
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Classroom Observation Tools for Teachers
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Abdominal Access Techniques with Prof. Dr. R K Mishra
2.FourierTransform-ShortQuestionswithAnswers.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
A systematic review of self-coping strategies used by university students to ...
RMMM.pdf make it easy to upload and study
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
VCE English Exam - Section C Student Revision Booklet
Cell Types and Its function , kingdom of life
Pharma ospi slides which help in ospi learning
master seminar digital applications in india
Computing-Curriculum for Schools in Ghana
Lesson notes of climatology university.
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Chinmaya Tiranga quiz Grand Finale.pdf
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Final Presentation General Medicine 03-08-2024.pptx
Classroom Observation Tools for Teachers
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx

Ch 8 data base

  • 1. 1 Chapter # 8 How Data is stored DATABASE
  • 2. 2 Items • An item of data means the smallest piece of data that may be a single name or a single number. • Field • A field is a area of a record reserved for one particular type of data. • Each field contain one or more data items.
  • 3. 3 Record • Record is a group of related items of data which together can be treated as a unit. • The records are similar to one another in the type of data. • Files • A file is organized collection of related records. • In computing a file is usually on backing store.
  • 4. 4 Examples Roll No Name Phone# DOB 1 Ali 042-78888 12/12/98 2 Ahmed 544545 09/4/97 FIELD RECORD ITEM A Students Files
  • 5. 5 Reasons for using files • In any situations requiring a permanent source of data. • In computer when the main store is so small for amount of data being processed.
  • 6. 6 Key field • A key field is field that may be used to search a file. • It is always useful to have one field which is unique to a particular record. • Admission form no of each student. • With the library system, the key field would be the number given to the book
  • 7. 7 Fixed and variable length fields • Fields may be of fixed or variable length. • If the fields are of fixed length then a given field in a record has a set number of characters positions reserved for it. • We specify how long each field is going to be when we set up the structure of a database • If the fields are of variable length, the number of characters in each is not determined beforehand.
  • 8. 8 Advantages of variable over fixed length • There is no waste of storage space • Advantages of fixed over variable length • Computer operations such as searching can be carried out quickly. • Allocation of storage space is more straight forward • Updating the file is much easier
  • 9. 9 Types of Files • 1.Master file • Is a file used as a reference for a particular computer application • It may be updated when necessary • It is the most complete and up-to date version of a file. • If the master file is lost or damaged and it is only copy, the whole system will break down.
  • 10. 10 Transaction file • Is a file of temporary data which has been prepared in order to carry out a processing operation with the data on a master file • It is used to update master file. • A transaction is a piece of a business. • Transaction can occur in any order, so it is necessary to sort a transaction file into the same order as the master file
  • 11. 11 Backup or security files • Backup copies of files are in kept in case the original file is damaged or lost or cannot be used • The importance of master file, back up copies of it should be taken at regular intervals in case it is stolen, lost or corrupted. • Looking after your disks is not enough you should always keep backup copies of all important data.
  • 12. 12 Transaction log files • Are bits of business such as placing an order, updating the stock, making a payment.
  • 13. 13 File Access Methods • Serial access • Sequential access • Random Access
  • 14. 14 Serial access • To read a serial file ,a computer has to read each record until it reaches the one required. • The records do not follow each other in any particular order. • So if another record needs to be added it can just be added to the end of the file.
  • 15. 15 Sequential Access • Access to a file is sequential when records can only be written to or read from it in order one after another. • So if just one record is required then method is slow but if all the records are required then it becomes fast • Sequential files can be stored on • Magnetic tape
  • 16. 16 Direct or Random Access • When any record can be accessed without having to access other records first • It store data on direct access. • You can access both sequential and random files directly
  • 17. 17 Advantages of direct access over sequential access • Selected records can be accessed far more quickly from direct access files. • Records can be accessed in any chosen order. • Records do not have to be put into any particular order before the file is created
  • 18. 18 Advantages of Sequential access over direct access • Sequential files can be stored on most media including magnetic tape ,paper tape and punched card • For the programmer ; it is usually easier to write programs to handle sequential files
  • 19. 19 Factors for choice of method • How may records are to accessed. If the records are to be accessed singly or few then direct access is used. • How large the file is. If a file is small the time delay in searching it is not important therefore a sequential file is acceptable. • Sequential files is often suitable for batch applications. • The type of storage medium being used. If magnetic tape is to used then files may have sequentail.
  • 20. 20 Files Systems • Manual File System • Mechanical File System • Electronic File Systems
  • 21. 21 Manual File • File is Processed manually without using any machine or tool. Problems: • Accessing the same information in same of two people can not possible. • If a file is placed in wrong place then finding it again can be problem • Updating the file is difficult.
  • 22. 22 Mechanical File System • File is processed by using different device like typewriters, mechanical printers. • That method is faster and more accurate than manual file.
  • 23. 23 Electronic file • File is processed through computers • Files and set of instructions are given to the computer as input and computer automatically processed that file.
  • 24. 24 Advantages of computerized system • Information is stored only once, since most database software allows you to access information from several files. • Files can be linked together which means that if you update one of the files. • Changing is in easy way • Data loss is less chance • Validations checks may be made on the data as it is being entered into database.
  • 25. 25 Disadvantages • If the computer breaks down you are not able to access the details. • It is easy to copy computer file so there is a need to protect sensitive data. • Training is needed to use the system
  • 26. 26 Data base • Database is organized collection of information or data. • Collection of related data stored in an efficient and compact manner.
  • 27. 27 Examples • ATM • NADRA • Flight Details • Hotmail Or Yahoo Or Google • Library in Schools
  • 28. 28 Types of Database • Centralized database • Distributed database
  • 29. 29 Centralized database • Complete data is located at a single computer and all the users access this single database. • Its an efficient way to access and update data. • Used in computer network environment.
  • 30. 30 Distributed database • Is a single database which is spread physically across multiple computers over wide area network . • It may be • Homogenous • Heterogeneous
  • 31. 31 DBMS • Database management system is computerized record keeping system. • Is a collection of programs, which are used to define ,create and maintain database.
  • 32. 32 Database System of a School Students Data DBMS Admission program Schedule Program
  • 33. 33 Common File processes • File updating • Insertions • Deletions • Amendments
  • 34. 34 File Updating • Involves bringing a file up-to-date with any changes that have occurred. • There are various process that can take place during updating.
  • 35. 35 Insertions • A new entry in the file. • Suppose we had a file containing the details of pupils in a school. • A new pupil may have joined the school and so that pupil’s details will need to be added to the file.
  • 36. 36 Deletions • A delete record in the file. • A pupil could have moved to a new school so that the pupil’s detail will need to be removed from the file.
  • 37. 37 Amendments • Some changes occur in the field of file. • A pupil has moved house so the address field needs changing.
  • 39. 39 Sorting • Some time a field need to be sorted in particular order. • It may be • Ascending • Descending
  • 40. 40 Merging • Sometimes we want to combine the contents of two files to form a single • The process of combining the files is called merging. • If the two files to be merged are on magnetic tape then we must sort the tapes into order before merging them. • Merging is very important when we want to divide the work.