1.3 Formats of Data
Level: 1 | Version: v1.1 | Author: Meptrasoft
Overview
Data can be organized in different ways depending on how clearly its structure is defined.
The three common formats are:
- Structured Data
- Semi-Structured Data
- Unstructured Data
The easiest way to understand them is:
Structured → Fixed structure
Semi-Structured → Some structure
Unstructured → No fixed structure

1. Structured Data
Structured data is data organized in a fixed format, usually in rows and columns.
It follows a defined structure, which makes it easy to store, search, sort, and analyze.
Structured data is commonly used in relational databases.
Example: Student Marks Table
| ID | Name | English | Maths | Social Science | Total |
|---|---|---|---|---|---|
| 1 | Marilyn | 38 | 24 | 28 | 90 |
| 2 | John | 41 | 24 | 32 | 97 |
| 3 | Joseph | 33 | 39 | 45 | 117 |
| 4 | Daniel | 35 | 36 | 25 | 96 |
| 5 | Anthony | 31 | 30 | 43 | 104 |
In this table:
- A row represents one complete record.
- A column represents one attribute.
- Every row follows the same structure.
- Each value has a defined position and meaning.
For example:
Row → One student's record
Column → One attribute such as Name or Maths
Real-World Examples
- Student records
- Employee records
- Product information
- Bank transactions
- Customer orders
2. Semi-Structured Data
Semi-structured data has some organization, but it does not have the rigid rows-and-columns structure of a relational table.
It often uses keys, tags, or nested structures to describe the data.
Common examples include:
- JSON
- XML
- YAML
- Log data
Example: JSON
{
"name": "John Smith",
"age": 20,
"department": "CSE",
"courses": [
"Python",
"SQL"
]
}
Here:
"name"is a key."John Smith"is its value."courses"contains multiple values.- Data can be nested inside other data.
Unlike a relational table, different JSON objects can contain different fields.
For example:
{
"name": "John",
"age": 20
}
Another object might contain:
{
"name": "Priya",
"age": 21,
"department": "IT"
}
The structure is still understandable, but it is more flexible than a fixed table.
3. Unstructured Data
Unstructured data does not follow a predefined tabular structure.
Examples include:
- Photos
- Audio recordings
- Videos
- PDF documents
- Scanned documents
- Voice recordings
For example:
student_photo.jpg
lecture.mp4
voice_note.mp3
resume.pdf
These files contain useful information, but they do not naturally fit into fixed rows and columns like a student table.
Simple Comparison
| Feature | Structured | Semi-Structured | Unstructured |
|---|---|---|---|
| Structure | Fixed | Flexible | No fixed structure |
| Common format | Rows and columns | Keys, tags, nested fields | Files / free-form content |
| Examples | SQL tables, CSV | JSON, XML, YAML | Images, audio, video, PDFs |
| Schema | Usually predefined | Flexible or partially defined | No fixed tabular schema |
| Easy to query as tables | Yes | Depends on the system | Usually requires specialized processing |
Key Idea
STRUCTURED
↓
FIXED TABLE STRUCTURE
SEMI-STRUCTURED
↓
FLEXIBLE STRUCTURE
UNSTRUCTURED
↓
NO FIXED TABULAR STRUCTURE
Why Does SQL Mostly Work With Structured Data?
SQL was designed primarily for working with structured data in relational databases.
For example, a database may contain:
Students
Orders
Products
Employees
Each table has defined columns and rows.
SQL can then be used to retrieve and analyze that data.
For example:
SELECT Name, Marks
FROM Students
WHERE Marks > 80;
This works naturally because the student data has a defined table structure.
Modern relational databases can also support semi-structured values such as JSON, but the relational table remains a core SQL data model.
Where Are These Formats Used?
Structured Data
Common in:
- Banking systems
- College systems
- Payroll systems
- Order management
- Transaction processing
Semi-Structured Data
Common in:
- Web APIs
- Application configuration
- Event data
- Application logs
- Data exchange between systems
Unstructured Data
Common in:
- Social media
- Video platforms
- Digital documents
- CCTV systems
- Customer support recordings
Common Beginner Mistakes
| ✗ Mistake | ✓ Correct Understanding |
|---|---|
| Structured data means only SQL data | Structured data can also exist in formats such as CSV and spreadsheets |
| Semi-structured data has no structure | It has some structure through keys, tags, nesting, or metadata |
| JSON is the same as a relational table | JSON has a flexible structure and can contain nested data |
| Unstructured data is useless | Unstructured data can contain valuable business and personal information |
| SQL can work only with structured data | SQL primarily works with relational/structured data, and modern databases can also support some semi-structured data |
Placement Quick Points
STRUCTURED
→ FIXED ROWS AND COLUMNS
→ EXAMPLE: RELATIONAL TABLE
SEMI-STRUCTURED
→ KEYS / TAGS / NESTED STRUCTURE
→ EXAMPLE: JSON, XML
UNSTRUCTURED
→ NO FIXED TABULAR STRUCTURE
→ EXAMPLE: IMAGE, AUDIO, VIDEO, PDF
- Structured data follows a defined schema and is commonly stored in relational tables.
- Semi-structured data has organization through keys, tags, or nested structures but is more flexible than a table.
- Unstructured data does not follow a fixed tabular structure.
- SQL is primarily used with structured relational data.
- Modern database systems can also work with some semi-structured data, especially JSON.
Interview Questions
- What is structured data?
Structured data is data organized in a predefined format, usually using rows and columns in a table.
- What is semi-structured data?
Semi-structured data has some organization through keys, tags, metadata, or nested fields, but it does not follow a rigid table structure.
- What is unstructured data?
Unstructured data does not follow a predefined tabular structure. Examples include images, videos, audio files, and documents.
- What is the main difference between structured and semi-structured data?
Structured data follows a predefined schema, usually rows and columns. Semi-structured data is more flexible and may use keys, tags, and nested structures.
- Is JSON structured or semi-structured?
JSON is generally considered semi-structured data because it uses keys and values and can contain nested structures without requiring a fixed table schema.
- Give examples of unstructured data.
Examples include:
Images Videos Audio recordings PDF documents Scanned documents- Why is structured data suitable for relational databases?
Relational databases organize data into tables with predefined columns and rows, which matches the structure of structured data.
Practice & Hands-On Exercises
Beginner Practice
- Define structured data in your own words.
- Define semi-structured data in your own words.
- Define unstructured data in your own words.
- Give three examples of each format.
- Explain the difference between a row and a column.
Classify the Data
Classify each as Structured, Semi-Structured, or Unstructured:
- Student table in MySQL
- JSON response from a web API
- MP3 audio file
- Employee CSV file
- XML document
- Video recording
- PDF document
Think and Answer
- Why is JSON more flexible than a relational table?
- Why is a student database table considered structured data?
- Why can an image not naturally be represented as rows and columns like a student table?
SQL Connection
Consider:
Student Table
ID | Name | Department | Marks
- Why is this structured data?
- Which part represents the records?
- Which part represents the attributes?
- Write a SQL query to display students who scored more than 80.
SELECT ID, Name, Department, Marks
FROM Students
WHERE Marks > 80;
💡 Tip: Test your queries using the in-browser interactive runner above.
Key Takeaway
STRUCTURED
→ FIXED TABLE
→ ROWS + COLUMNS
SEMI-STRUCTURED
→ FLEXIBLE STRUCTURE
→ KEYS / TAGS / NESTED DATA
UNSTRUCTURED
→ NO FIXED TABULAR STRUCTURE
→ FILES / MEDIA / DOCUMENTS
Structured data has a fixed format, semi-structured data has a flexible format, and unstructured data has no fixed tabular structure.
End of Formats of Data