|
Definition :
The logical inter-relation between elementary data items is called as
data structure. The basic data items include integers, bits, characters.
Basically it deals with manipulation and organization of data, solving problems with computer involves data manipulation. But the data available will usually be in amorphous form. When different types of such data are related to each other, then we call it to be a data structure.
Ex : Queues, Trees, etc.
D = { d , F , A }
Where,
D : Data structure
d : Domain variable
F : A set of functions or procedures operating on domain variables.
A : A set of axioms or rules which governing the operations of these functions on the domain variable.
Advantages
The major advantages of data structures are :
• It gives different level of organizing data.
• It tells how data can be stored and accessed in its elementary level
Operation on
Data Structures
The operations that can be performed on data structures are :
Creation : This operation creates a data structure. The declaration statement causes space to be created for data upon entering at execution time.
Destroy : This operation destroys the data structure and aids in the efficient use of memory.
Selection : This operation is used to access data within a data structure. The form of selection depends on the type of data structure being accessed.
Update : This operation changes or modifies the data in the data structure and it is an important property in selection operation.
Types of Data
Structures
Linear
Data Structure :
Stacks, Queues, Linked Lists, etc.
Non-linear
Data Structure :
Trees, Graphs, etc.
Back to Basics
Array
: Array is
an ordered set which consists of a fixed number of
objects. No deletion or insertion operations are performed
on arrays.
List
: List on
the other hand is an ordered set containing of a variable
number of elements to which insertions and deletions can
be made. The
list is divided into two types :
File
: File is
typically a large list that is stored in the external
memory of a computer. Ex: Magnetic disk.
|