Introduction
This is part 7 of my series, Database Essentials. Database Essentials is division 1 of a set of tutorials I have on Database. In this part of the series, we look at what is called the Aggregation Association. This is another kind of relationship we have to learn. Our aim is to discover the nature of this association and not to know how to derive it or when to use it or how to use it. Aggregation relationship is also known as a Collection relationship.
Table Example
You will have to open the following link in a browser tab in order to see the tables and diagrams of this tutorial.
http://www.cool-mathematics.biz/diagrams/aggregation.htm
Table 7.1 shows a Sale table (sample) and Table 7.2 shows the corresponding Sale Item table (sample) for a wholesale company. We have seen these tables before. However, we shall look at them now from a different light. The Sale with ID 10 in the Sale table has the corresponding sale items of the first three rows of the Sale Item table. The Sale with ID 20 in the Sale table has the corresponding sale items of the fourth and fifth rows of the Sale Item table. The Sale with ID 30 in the Sale table has the corresponding sale items of the sixth, seventh and eighth rows of the Sale Item table.
We say the Sale with ID 10 has a collection of three rows (the first three) in the Sale Item table. We say the Sale with ID 20 has a collection of two rows (fourth and fifth) in the Sale Item table. We say the Sale with ID 30 has a collection of three rows (sixth, seventh and eighth) in the Sale Item table. The word, "collection" here does not have exactly the same meaning as it has in classical object technology; however, that is not a big deal.
So from the tables, we say that a Sale consists of a collection of items. The aggregation or collection relationship is between each sale and its collection of items. We normally say an aggregation relationship can exists between two entities (tables). Here, an aggregation relationship exists between the Sale and Sale Item tables. The way to denote this with a class diagram is shown in fig. 7.1.
In the diagram the Sale class is called the aggregate. A line connects the two classes (tables). The line has a diamond end on the aggregate side.
That is it for Aggregation relationship. Let us take a break here and continue in the next part of the series.
Chrys
Published by Chrys Forcha
I have more than 10 years experience in computer programming, software, electronics and telecommunications. I have a First Degree in Electronics and a Master's Degree in Technical Education. As well a... View profile
- UNC Charlotte: Hangouts and Study SpotsThe best hangouts and study spots on campus.
The Best and Worst of New York City's Movie TheatersA guide to ten of New York City's movie theaters: five multiplexes and five indie art houses. Don't go to the movies in New York without it.
Pedigree Recalled by Manufacturer Due to Possible Salmonella ContaminationMars Petcare U.S. has issued a voluntary nationwide pet food recall affecting more than a dozen brands of possibly tainted dry dog and cat food. The recall was issued due to pos...- Christianity and Art: A Review of Art and the Bible by Francis SchaefferChristian artists are commissioned by God to create, produce and share their art fearlessly. Francis Schaeffer makes some excellent points on how to do this effectively.
- Teething and Your BabyTeething and Your Baby
- Database Associations Overview
- Database Table Data Types
- Database
- The Use of Actuarial Risk Assessment in the Commitment of Sexually Violent Persons
- Modern-Day Mass Media: How the Few Decide for the Whole
- How to Avoid Errors in Economic Thinking
- How Experts Are the Experts on a Delphi Technique Panel?



