- LPU MCA Semester 1
- CAB107
- Unit 3
CAB107 · Unit 3: Data collection, preprocessing and visualization
Data collection methods, structured and unstructured data
10 practice questions · in the MTE and ETE syllabus
Key points
- Primary data is first-hand, secondary was collected earlier
- JSON and XML are semi-structured
- Images, audio and free text are unstructured
- Narrow collection channels cause coverage bias
Data can be collected as primary data, gathered first-hand through surveys, experiments, observation or sensors, or as secondary data, collected earlier by someone else, often for a different purpose, such as public records, reports or databases.
| Type | Schema | Examples |
|---|---|---|
| Structured | Fixed rows and columns | Relational tables, spreadsheets |
| Semi-structured | Tags or keys, no fixed table schema | JSON, XML |
| Unstructured | No predefined schema | Free text, images, audio, video |
Structured data can be joined and queried directly with SQL. Semi-structured data carries markers that describe its content and is routinely parsed by programs. Unstructured data needs text, image or audio processing before analysis; a set of emails, scanned invoices and call recordings is mostly unstructured.
The three Vs of big data are volume (size), velocity (speed of arrival) and variety (many formats). A dataset of only a few thousand rows that mixes JSON logs, photographs and reviews is a variety problem, not a volume problem.
Collection can introduce sampling or coverage bias: a survey posted on one platform never reaches people who do not use it.
Exam trap: data stored on disk is not automatically structured; structure refers to schema, not storage location.
Try two questions
A weather service offers a documented endpoint that returns the current temperature as JSON on request. Which collection method is the most direct?
- Running a paper questionnaire in the street
- Holding a telephone interview with the forecaster
- Calling the endpoint through an API
- Observing the sky and noting the temperature by hand
Show the answer
C. APIs let programs request data in a structured format such as JSON.
Why not A: A questionnaire collects opinions, not machine-readable temperature records.
Why not B: Interviews give descriptions, not a structured data feed.
Why not D: Manual observation is slow and cannot produce an automated feed.
Which description fits semi-structured data such as JSON or XML?
- It carries tags or keys that describe its content but does not follow a fixed table schema
- It is stored strictly in rows and columns, with a fixed data type declared for every column
- It has no internal markers or keys and consists of raw pixels or raw audio samples
- It cannot be parsed by programs at all, because it has no organisation of any kind inside the file
Show the answer
A. Semi-structured data sits between the two: self-describing, but with a flexible schema.
Why not B: Fixed rows and columns describe structured data.
Why not C: Raw pixels without markers describe unstructured image data.
Why not D: JSON and XML are routinely parsed by programs because tags and keys give them organisation.