# Difference between data type and data structure

Data Structure AlgorithmsAnalysis of AlgorithmsAlgorithms

Best Seller

89 Lectures 11.5 hours

#### Practical Data Science using Python

22 Lectures 6 hours

#### Data Science and Data Analysis with Python

50 Lectures 3.5 hours

As we know that programming entirely revolves around data. It is data over which all the business logic gets implemented and it’s the flow of data which comprises the functionality of an application or project. So it becomes very much important to organize and store the data for its optimized use and does the effective programming with good data model.

In general both data type and data structure seems to be the same thing as both deals with the nature and organizing of data but among two one describes the type and nature of data while other represents the collections in which that data can be stored.

Following are the important differences between Data Type and Data Structure

Sr. No.KeyData TypeData Structure
1DefinitionData type is the representation of nature and type of data that has been going to be used in programming or in other words data type describes all that data which share a common property. For example an integer data type describes every integer that the computers can handle.On other hand Data structure is the collection that holds data which can be manipulated and used in programming so that operations and algorithms can be more easily applied. For example tree type data structures often allow for efficient searching algorithms.
2ImplementationData type in programming are implemented in abstract implementation whose definition is provided by different languages in different ways.On other hand Data type in programming are implemented in concrete implementation as their definition is already defined by the language that what type of data they going to store and deal with.
3StorageIn case of data type the value of data is not stored as it only represents the type of data that can be get stored.On other hand data structure holds the data along with its value that actually acquires the space in main memory of the computer. Also data structure can hold different kind and types of data within one single object
4AssignmentAs data type already represents the type of value that can be stored so values can directly be assigned to the data type variables.On other hand in case of data structure the data is assigned to using some set of algorithms and operations like push, pop and so on.
5PerformanceIf case of data type only type and nature of data is concern so there in no issue of time complexity.On other hand time complexity comes in case of data structure as it mainly deals with manipulation and execution of logic over data that it stored.
Updated on 24-Feb-2020 12:20:14