What is Aggregation?

Instructor: David Gloag
We live in a complex world. And because of this, computer science is constantly looking for ways to describe it. In this lesson, we'll take a look at the concept of aggregation, what it is, why we use it, and some examples.

The Simplicity of More

Information comes at us from all directions. Our banks provide us with account information, our cell phones provide us with phone number and message information, and our governments provide us with revenue and tax information. As such, we are constantly looking for ways to slice and dice it, in an effort to understand it. But would you be surprised to know that we also combine it? And put it together in a way that makes it easier to manipulate? Indeed, we do. This combining process creates a whole that is easier to describe and work with. The process is called aggregation.

What Is Aggregation?

Aggregation is the process of combining things. That is, putting those things together so that we can refer to them collectively. As an example, think about the phone numbers on your cell phone. You can refer to them individually - your mother's number, your best friend's number, etc. But it's easier to think of them collectively, as your phone number list. It is also important to realize that each member of the aggregation still has the properties of the whole. In other words, each phone number in the list remains a phone number. The process of combining them has not altered them in any way.

Why Do We Use Aggregation?

As mentioned, we use aggregation to refer to a group of items as a whole. That is its main purpose. But it also provides one other significant benefit; it simplifies accessing the individual items because we can refer to them as part of the whole. Consider an array. This is an aggregating mechanism that creates a group of ordered entries, where each individual entry can be referred to by its index. If you think about it, this is a powerful idea. It means that the group can be referred to by its name, say X. And its members can be referred to by their index, X[1], X[2], and so forth. A number of computer languages support this idea.

What Are Some Examples of Aggregation?

In addition to an array, there are a number of aggregating mechanisms used in programming languages. Some examples include:

To unlock this lesson you must be a Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use

Become a member and start learning now.
Become a Member  Back
What teachers are saying about
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create An Account