Data in a particular problem consists of a set of elementary items or atoms. An atom usually consists of single elements such as integers, bits, characters, or a set of such items. A person solving a particular problem is concerned with establishing paths of accessibility between atoms of data. The choice of atoms of data is a necessary and key step in defining and then solving a problem. The possible ways in which the data items or atoms are logically related define different data structure. It is important to point out that the class (i.e. c++ class) of concepts dealing with data structures has become increasingly important in recent years.
A number of operations can be performed on data structure – operations to create and to destroy a data structure, operations in insert elements into and delete elements from a data structure, and operations to access elements within a data structure.
The representation of a particular data structure in the memory of a computer is called a storage structure. There are many possible memory configurations, or storage structures corresponding to a particular data structure. For example, there are a number of possible storage structures for a data structure such as an array. In discussing storage structure, we will be concerned with representing data structures in both the main and the auxiliary memory of the computer. A storage structure representation in auxiliary memory is often called a file structure.
Data structure deals with –
- What is meant by data?
- How data is transmitted?
- How data is stored in a computer?
There are two types of data structures
- 1. Primitive data structures
- 2. Non-primitive data structures
Primitive data structures:
The structuring of data at their most primitive level within a computer, i.e., the data structures that typically are directly operated upon by machine-level instructions. The Primitive data structures are the integers, real, logical data, character data, and pointer data.
Non-primitive data structures:
Non-primitive data structures can be classified as arrays, lists and files.