You are on page 1of 5

Faculty of Computing and Informatics

Lesson 5 - Theory
Composite Data
Learning Objectives

After studying this lesson, you should be able to:

• Learn more about composite data types


Introduction

A composite key is exactly the same as a ordinary, single


column, key, but is longer and composed of multiple values.

Is that important?
Composite Data Types

• Us records when you want to store values of different data types


that are logically related. If you create a record to hold employee
details, identify that all the values stored are related because they
provide information about a particular employee.

• Use collections when you want to store values of the same data
type.
Why Use Composite Data Types?

• You will have all the related data as a single unit.

• You can easily access and modify the data.

• Data is easier to manage, relate, and transport if it is composite.

• Consider having a single bag for all you laptop components


instead of having a separate bag for each component.

You might also like