Skip to main content
1 of 2
Aviv Cohn
  • 21.6k
  • 35
  • 127
  • 186

Collection vs data structure vs aggregate

I know three terms that have to do with storing objects or data. I'm not sure I understand the exact differences between the terms. Please confirm if what I'm about to write is accurate.

A data structure is a group of data types or objects of the same type, grouped together in some formation.

A collection is the same as a data structure (I don't mean a Java Collection, I mean a collection in the more general meaning).

An aggregate is an object containing a collection or data structure. For example, the object someContainer, which contains an inner ArrayList, is an aggregate because it contains a data structure.

Is all of this accurate?

Aviv Cohn
  • 21.6k
  • 35
  • 127
  • 186