Grouping and Sorting Records in Kumologica
Let's get organized.
Join the DZone community and get the full member experience.Join For Free
Grouping and sorting of records are common functionalities seen in many microservices and integration requirements. In most use cases, the records fetched from the source system might be in raw form, with all the records treated separately, without having any records grouped as per the functional requirements. Similarly, another functionality that is popularly used is the sorting of records. This can be either sorting based on an existing property in the record, or it can be based on the computation of some properties and then sorting the records based on the result of the computation.
Grouping is the functionality of combining records with a common property or attribute as a single unit. This can be based on one property or multiple properties associated with the records. These properties can also be referred to as keys. In the diagram below, we can see cars of different brands grouped based on the their color and type properties. Group 1 has both Ford and BMW since they have the same traits of color and type.
Sorting is the functionality of ordering the records based on a property associated with the record. In the diagram below, we can see cars of different brands stacked based on the RegNo order.
How to Group and Sort in Kumologica
Opinions expressed by DZone contributors are their own.