Computer Science · Ch 7 — Understanding Data
Types of Data
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.
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 / Activity | Data Fields / Parameters / Attributes |
|---|---|
| Books at a shop | BookTitle, Author, Price, YearofPublication |
| Depositing fees in a school | StudentName, Class, RollNo, FeesAmount, DepositDate |
| Amount withdrawal from ATM | AccHolderName, AccountNo, TypeofAcc, DateofWithdrawal, AmountWithdrawn, ATMid, TimeOfWithdrawal |
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
Although there are methods to process unstructured data, this textbook focuses only on handling structured data.
Metadata: Data about Unstructured Data …
| ModelNo | ProductName | Unit Price | Discount(%) | Items_in_Inventory |
|---|---|---|---|---|
| ABC1 | Water bottle | 126 | 8 | 13 |
| ABC2 | Melamine Plates | 320 | 5 | 45 |
| ABC3 | Dinner Set | 4200 | 10 | 8 |
| GH67 | Jug | 80 | 0 | 10 |
| GH78 | Table Spoon | 120 | 5 | 14 |
| Entity/Activities | Data Fields/Parameters/Attributes |
|---|---|
| Books at a shop | BookTitle, Author, Price, YearofPublication |
| Depositing fees in a school | StudentName, Class, RollNo, FeesAmount, DepositDate |