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, providing an interface to communicate with the inner data structure. For example, the object someContainer, which contains an inner ArrayList, is an aggregate because it contains a data structure, encapsulates it, and provides an interface to manipulate it.

Is all of this accurate?

A Data Structure is any structure that holds data. Data Structures are distinguished from each other by their memory usage and performance characteristics. For example, the lookup performance of a Hash Table is O(1), while that of a balanced binary tree is O(log n).

A Collection is any data structure that can hold zero or more data items. Generally, the data items will be of the same type or, in languages supporting inheritance, derived from some common ancestor type. Collections can utilize certain data structures, such as Hash Tables and Balanced Binary Trees, to improve their memory and performance characteristics.

An Aggregate, in the general sense, is a whole combined from individual elements (the individual elements can form a collection). Examples include Sum and Average functions, the results of those functions, and the process by which data is combined in a data warehouse to speed up retrieval.

4

A Data Structure is a computer science term for some way of ordering data, and how you can store/retrieve data from it.

A Collection is a Data Structure which can hold an arbitrary number of objects. There are many types of collections, differentiated by their data organization and by their store/retrieve algorithms, giving different complexity in different use-cases. For example:

  • an Array has a random access read (which means that if you know at what index you item is, you can retrieve it with complexity O(1)), but for adding a new item beyond the capacity of the array, you need to copy it to an array with double capacity, giving a worst case of write of O(n).
  • a Linked list, on the other hand, doesn’t have random access, meaning that you need O(n) for retrieving an object, but adding an element to it is in O(1).

An Aggregate function is a database term for taking a vector data (which is an arbitrary number of items) and by using some operation (addition, average, etc.) creating a scalar (which is a single item, or a fixed number of items) result. Examples may be count, sum, average, max. One feature of aggregate functions is that it does not retain whole the information it receives, but keeps only some aspect of it.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật