What Are Data Structures?

A data structure is a format for organizing, processing, retrieving and storing data so it can be easily accessed and effectively used.

Written by Anthony Corbo
Data structures image of a person sitting at a laptop typing with one hand and resting their chin on their fist.
Image: Shutterstock / Built In
Brand Studio Logo
UPDATED BY
Brennan Whitfield | Sep 30, 2024
REVIEWED BY

There are several basic and advanced data structures; they’re created to arrange data to make it useful for a specific purpose. At their core, data structures are intended to frame information in a way that makes that information clear and easily accessible to both humans and machines.

What Is a Data Structure?

A data structure is a format for organizing, storing, processing and retrieving data in a computer system. Data structures define how data is handled and accessed, making them fundamental to efficient programming and software applications.

 

Data Structures Crash Course. | Video: CrashCourse

Structured vs. Unstructured Data: What’s the Difference?

Structured and unstructured data differ in many ways, however, the primary difference is that structured data is defined and searchable while unstructured data is contained in its native form. There is vastly more unstructured data in existence, which makes up 80 percent of all enterprise data. This percentage continues to grow, which presents opportunities for forward-thinking businesses to mine data insights.

Other differences include:

  • Structured data is quantitative, while unstructured data is qualitative.
  • Structured data is stored in data warehouses, while unstructured data is contained in data lakes.
  • Structured data can be immediately analyzed, while unstructured data requires processing and transformation.
  • Structured data follows predefined formats, while unstructured data comes in many different formats.

Related Reading From Built In Experts8 Common JavaScript Data Structures

 

Types of Data Structures

The four basic data structure types are linear data structures, tree data structures, hash data structures and graph data structures.

1. Linear Data Structures

Linear data structures include arrays, or finite groups of data, with memory locations that allow elements to be accessed through an index key and linked lists. Linked lists order elements within a list so they can be sporadically placed within memory.

2. Tree Data Structures

Tree data structures are hierarchical and present a root value with subsets of children that are represented as linked nodes. Tree data structures come in many varieties with several distinct characteristics, including binary trees, binary search trees, red-black trees, weight-balanced trees and binary heaps.

3. Hash Tables

Hash tables map keys to values, abstracted by additional behaviors through the use of high-level programming languages. Some variations of hash tables include separate chaining and linear probing.

4. Graph Data Structures

Graph data structures are implemented through graph theory principles, utilizing nodes and edges to weigh graphs and represent the directional flow of networks.

More on Built In’s Expert Contributors NetworkHow Do You Use Data Structures and Algorithms in Python?

 

Data Structures vs. Algorithms: What’s the Difference?

Data structures and algorithms are entirely different concepts. 

Data structures represent data relationships and provide methods of sorting and accessing data effectively.

Algorithms are a detailed set of instructions that computer software, web pages, programs and hardware use to complete a task. They are well-defined, finite sequences of instructions you can implement with a computational system to reach a repeatable goal.

We can design algorithms to be efficient for specific data structures. If an algorithm is designed for a specific data structure, using it with a different data structure will lead to inefficiencies in the results.

Frequently Asked Questions

A data structure is a specified format that defines how data is organized, stored and processed within a computer system. Data structures help efficiently manage data and make it easier to understand for users and machines. They are fundamental to coding and building software applications.

Four common types of data structures include:

  1. Linear data structures
  2. Tree data structures
  3. Hash data structures or hash tables
  4. Graph data structures
Explore Job Matches.