ELI5: Data Types

Candace Codes
2 min readJul 20, 2020

Why Data Structure Matters:
When designing a new application or program which relies on a multitude of algorithms, the speed of how data is obtained, retrieved, and gathered affects the efficiency of the program and ultimately the user experience itself. By optimizing our data structure, we can improve the quality of an application/program.

What data types are there?

  • A primitive data type is able to store data, such as Integer, Float, Boolean, and Char.
  • A non-primitive data type is not defined by the programming language but instead defined by the programmer, such as functions and arrays.
Figure from javatpoint

Linear data structure occurs when data elements are combined in a specific order. In this case, the data elements may be held together in two possible forms: arrays and linked lists. In this case, only a single level of order is involved, with each and every element attached to its adjacent elements before and after it. Thus, a fairly straightforward method can be used to traverse elements in a linear data structure, ex. when used in application software development.

Non-linear structure is used to represent data containing a hierarchical relationship among various elements. In this case, elements are attached to each other hierarchically, involving multiple levels of data structure. Examples of non-linear data include graphs, family of trees, and table of contents. While traversing non-linear data structures, is not as simple compared to linear structures, its form utilizes computer memory more efficiently compared to if the data elements were only allowed to be arranged linearly. Examples of non-linear structure usage include artificial intelligence and image processing in health information technology.

Figure. Zooming in on linear and non-linear data structures. Graph from GeeksForGeeks.

Other possible defining characteristics of data structures:

Figure. Expansion on possible data type characteristics. Table from StudyTonight

References:

--

--