Phases of storing and handling data
Phases of storing and handling data
This post is all about the different way of storing the data
.data is the most important part of any organization and today the whole IT
industry is working for this. most of the times we are spending our time in
storing updating and accessing this data. So here the step by step ways of
handling data is given.
In the beginning of time we are using arrays as a means of storage of
data but because of its limitations we switch on to the next concept but it has
also some limitations so we move on to the next concept which is queues and
then linked lists.
- Arrays
- Stack
- Queues
- Linked list
Array
|
Stack
|
Queu
|
Link
list
|
||||||
Concept:
|
an
array is a data structure used to process multiple elements with the same
data type when a number of such elements are known.
|
A
stack is a memory in which values
are stored and retrieved in “”last in first out” manner by using operation
called push and pop.
|
A
queu is also a list of elements with insertion at one end- called rear, and
deletions permitted from other end- called the front.
|
A
link is a data structure that is used to model such a dynamic list of data
items.
|
|||||
Working property:
|
Uses
similar type of data items and static in nature.
|
Uses
the property of LIFO (last in first out) which means it has only one entry
and exit point and the data last inserted will be pop first.
|
Uses
the property of FIFO (first in first out) which means that the data first inserted
will pop up first. Just like a real life queue.
|
Using
the concept of DMA (dynamic memory allocation) allocates the memory space
during program execution.
|
|||||
How
accessed? :
|
Uses
subscript for accessing its each element lowest subscript represented as zero
and highest subscript as
(n-1) element.
|
Uses
a pointer TOP to store the different values using the concept of push and and pop. push means to insert an element and pop means to delete an element.
|
Uses
two pointer rear and front rear contains the first value of the given data
and front contains the last element of the given data.
|
It
has two ends first and last just like queue but its every and has two parts
data part and address part which is
accessed with a next variable which is a user defined variable .
|
|||||
Representation:
|
a[0]………..a[n-1]
|
|
|
|
|||||
Where used? :
|
Is
used when the number elements are known. For e.g. if you have to find the
average marks of 50 students then array will be suitable for this.
|
Stack
is basically used for handling or execution of large programs within a small
memory space with its concept of push and pop. Is used to store a list of
elements process it and then pop it up.
|
there is need to store different kinds of data and all kind of data can not be stored using a stack then the concept of queue is made.it has two ends just like a real life queue in this concept the data first
inserted will be processed first and works on FIFO which means the data inserted first will be processed first just opposite to stack.
|
This
concept is used for allocating the memory space exactly without wastage storage of data and memory location. and this can be only done at the
time of insertion of data which is done by using the concept of dynamic
memory allocation DMA.
|
In the
above table arrays ,stacks ,queues and linked list is explained . every invention
is done because of the limitations of its previous concepts in the same way
array has the limitation that there is a lots of memory wastage, then we switched on the concept of stack in which we are using arrays in which there
is a continuous operation is performed known as push and pop.in this operation we in small
memory space it can perform different execution of operations but we need some more then the concept of queue is made
because stack has the problem that the data inserted first will be last out and we have other type of data which can not be process using this concept then this problem removed in queue and after this the linked list is made to reduce the execution time of different operations . Each and every
concept of storing data is appropriate according to its kind and all
concepts used according to the demand of data storage.
Comments
Post a Comment