Skip to content

Computer Science · Ch 7 — Understanding Data

Types of Data

7.1.2

Types of Data

Data comes from many sources, and its format depends entirely on where it originates. An image is a grid of pixels, a video is a sequence of frames, a fee slip mixes numbers and text, and a chat message can contain text, emojis, and media. Because of this variety, data is classified into two broad categories based on its format: structured and unstructured.

(A) Structured Data

Data that is organised and can be recorded in a well-defined format is called structured data. It is typically stored in a computer in a tabular form — that is, in rows and columns.

  • Each column represents a particular parameter, also called an attribute, characteristic, or variable.
  • Each row represents a single observation — the data for one entity across all attributes.

For example, consider the inventory of kitchen items in a shop. The data can be arranged in a table where columns are Model Number, Product Name, Unit Price, Discount (%), and Items in Inventory. Each row gives the details for one product.

Note

With structured data stored this way, a shop owner can perform calculations easily. For instance, to find the total number of items in stock, they simply sum the values in the "Items_in_Inventory" column. To find the total value of all inventory, they multiply each "Unit Price" by the corresponding "Items_in_Inventory" and then add those products.

The textbook provides several other examples of structured data, each with its own set of attributes:

Entity / ActivityData Fields / Parameters / Attributes
Books at a shopBookTitle, Author, Price, YearofPublication
Depositing fees in a schoolStudentName, Class, RollNo, FeesAmount, DepositDate
Amount withdrawal from ATMAccHolderName, AccountNo, TypeofAcc, DateofWithdrawal, AmountWithdrawn, ATMid, TimeOfWithdrawal
Tip

Activity 7.1: Observe Voter Identity cards of your family members and identify the data fields under which data are organised. Are they same for all?

(B) Unstructured Data

Not all data fits neatly into rows and columns. Data that does not have a traditional row-and-column structure is called unstructured data.

Consider a newspaper. It contains news items, images, and advertisements, but there is no fixed pattern for how these are arranged. One day a page might have three images of different sizes, five news articles, and an ad. Another day it might have one large image and three text articles. There is no predefined structure.

Similarly, an email has no fixed structure for how many lines, paragraphs, or attachments it must contain.

Examples of unstructured data include:

  • Web pages (which mix text, images, graphics, audio, and video)
  • Text documents and business reports
  • Books
  • Audio and video files
  • Social media messages
Watch out

Although there are methods to process unstructured data, this textbook focuses only on handling structured data.

Metadata: Data about Unstructured Data …
Table 7.1Structured data about kitchen items in a shop
ModelNoProductNameUnit PriceDiscount(%)Items_in_Inventory
ABC1Water bottle126813
ABC2Melamine Plates320545
ABC3Dinner Set4200108
GH67Jug80010
GH78Table Spoon120514
Table 7.2Attributes maintained for different activities
Entity/ActivitiesData Fields/Parameters/Attributes
Books at a shopBookTitle, Author, Price, YearofPublication
Depositing fees in a schoolStudentName, Class, RollNo, FeesAmount, DepositDate