Common types of Data Structure

Common types of Data Structure

Common types of Data Structure

A Database is an organized collection of data. Simply, it is a structured set of data held in a computer, especially one that is accessible in various ways.

A data structure is a specialized format for organizing and storing data. General data structure types include the array, the file, the record, the table, the tree, and so on. Any data structure is designed to organize data to suit a specific purpose so that it can be accessed and worked with in appropriate ways. In computer programming, a data structure may be selected or designed to store data for the purpose of working on it with various algorithms.

Below explain some common types of data structure:

An array is a list of a finite number of homogenous data elements. The elements of the array are referenced respectively by an index set. For representation of array in memory, we cannot use record. The structure of array is simple than the record structure. The insertion and deletion of an array are much easier than a record.

Record, in general sense, it is the collection of field values of a given entity. In other words, a record is a collection of non-homogenous data items. So record can be defined briefly as a collection of related data an item, each of which is called a field or attribute.

A file is a collection of data or information that has a name called the filename. Almost all information stored in a computer must be in a file. There are many different types of files, e.g., Data files, text files, program files, directory files and so on.

A pointer is a variable which holds the address of another variable. An array is called a pointer array if each element of the array is a pointer.

Advantages of pointer:

  1. Dynamic memory allocation is possible with pointers.
  2. Passing arrays and structures to functions.
  3. Passing addresses to function.
  4. Creating data structures such as trees linked etc.

Share This Post