1. LPU MCA Semester 1
  2. CAB107
  3. 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.

TypeSchemaExamples
StructuredFixed rows and columnsRelational tables, spreadsheets
Semi-structuredTags or keys, no fixed table schemaJSON, XML
UnstructuredNo predefined schemaFree 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

Question 1 · Tier 3, Apply

A weather service offers a documented endpoint that returns the current temperature as JSON on request. Which collection method is the most direct?

  1. Running a paper questionnaire in the street
  2. Holding a telephone interview with the forecaster
  3. Calling the endpoint through an API
  4. 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.

Question 2 · Tier 2, Understand

Which description fits semi-structured data such as JSON or XML?

  1. It carries tags or keys that describe its content but does not follow a fixed table schema
  2. It is stored strictly in rows and columns, with a fixed data type declared for every column
  3. It has no internal markers or keys and consists of raw pixels or raw audio samples
  4. 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.