Describe Core Data Concepts · Topic 1 of 4
Ways to Represent Data
DP-900 data representation: structured, semi structured and unstructured data compared, with JSON, XML and CSV examples and how each is queried and stored.
- 5 min
- Structured data has a fixed schema and lives in tables, queried with SQL.
- Semi structured data is self describing, with JSON, XML, key value and graph as the usual examples.
- Unstructured data has no model and is stored as files or blobs.
What it is
Data is any recorded fact: a price, a name, a photo, a sensor reading. The exam sorts data into three shapes by how much structure it has: structured, semi structured and unstructured.
The shape decides which store you pick and how you query it, so this is the first idea to master.
How it works
Structured data
Structured data follows a fixed schema. Every row has the same columns, and every column has a data type such as integer, text or date. The natural home is a relational database table, and you query it with SQL.
| CustomerID | Name | City | Joined |
|---|---|---|---|
| 101 | Ana Silva | Lisbon | 2024-03-12 |
| 102 | Ben Okoye | Lagos | 2024-05-30 |
A CSV file is also treated as structured when each line holds the same fields in the same order.
Semi structured data
Semi structured data has some organisation but no fixed table layout. Each item carries its own labels, so one record can have fields another lacks. Common forms are JSON documents, XML files, key value pairs and graphs.
{
"id": 101,
"name": "Ana Silva",
"phones": ["+351 21 000 0000"],
"address": { "city": "Lisbon" }
}
The same data as XML uses opening and closing tags, and an attribute such as id="101" sits inside the tag itself.
<customer id="101"><name>Ana Silva</name><city>Lisbon</city></customer>
Because the structure travels with the data, it is called self describing. You can add a new field to one record without altering any other.
Unstructured data
Unstructured data has no predefined model. Examples are documents, PDF files, images, video, audio and the free text of an email. You cannot place a photo into rows and columns, so it is kept as a file or a binary large object, called a blob.
To get meaning from it you use other tools, such as image recognition or text analysis, or you attach a little structured information to it, such as a title and a date.
Comparing the three shapes
| Structured | Semi structured | Unstructured | |
|---|---|---|---|
| Schema | Fixed, defined first | Flexible, inside the data | None |
| Typical store | Relational database | Document or key value store | Blob or file storage |
| Typical formats | Tables, CSV | JSON, XML | Images, video, documents |
| Query with | SQL | Queries over keys or paths | Search or specialised tools |
A worked scenario
An online shop keeps three kinds of information. Orders and prices sit in tables with fixed columns, so that is structured data. Each product has a flexible set of attributes stored as a JSON document, so that is semi structured. Product photos and customer review videos are files with no internal schema, so they are unstructured. One shop therefore uses all three shapes at once.
Spotting the shape from a description
| Description | Shape |
|---|---|
| A spreadsheet export where every row has the same columns | Structured |
| One JSON message per tweet, with optional fields | Semi structured |
| Web server log lines in a consistent text layout | Semi structured |
| A scanned contract saved as a PDF | Unstructured |
| A table of orders in a SQL database | Structured |
| A recording of a customer phone call | Unstructured |
| Friends and the links between them | Semi structured, as a graph |
Metadata bridges the gap
A photo is unstructured, but it can carry metadata: the file name, the date taken, the camera and a few tags. That small amount of structured data lets you search and filter a large set of photos without analysing the pictures themselves. Blob storage works this way, with the content kept as an object and descriptive properties held beside it.
Moving between shapes
Data is often reshaped on its way to analysis. A nested JSON order can be flattened into rows for a table, and the text of a document can be analysed to pull out names and dates, turning unstructured content into structured fields. The reverse is also common: a relational row is exported as a JSON document for a web application. Knowing which shape you start with tells you which tool to use first.
What to remember for the exam
- Structured data has a fixed schema and lives in tables, queried with SQL.
- Semi structured data is self describing, with JSON, XML, key value and graph as the usual examples.
- Unstructured data has no model and is stored as files or blobs.
- Adding a field to one JSON document does not change the others, which is the key benefit of semi structured data.
- A graph stores nodes and the edges between them, and is a semi structured form.
Ask whether every record must have the same fields. If yes, it is structured. If records may differ but carry their own labels, it is semi structured. If there are no fields at all, it is unstructured.
How the exam asks about this
- "A product catalogue where each item has different attributes." Semi structured.
- "A collection of scanned invoices as image files." Unstructured.
- "Which data uses tags or keys to describe itself?" Semi structured.
- "Which type fits rows and columns with defined data types?" Structured.
Common mistakes
Calling JSON structured because it looks tidy. JSON has structure inside each item, but no fixed schema across items, so it is semi structured.
Treating an email as structured. The sender and date are fields, but the message body is free text, so the content is unstructured.
Thinking unstructured data cannot be stored. It is stored every day as blobs and files. It just cannot be queried with SQL directly.
Assuming XML and JSON are different kinds of data. Both are semi structured, written in different syntax.
Check yourself
Which data shape has a fixed schema of rows and columns?
Structured data.
What do JSON and XML both describe?
Semi structured data, because each item carries its own labels.
What is an image or video file classed as?
Unstructured data, usually stored as a blob.
Topic 1 of 4 in Describe Core Data Concepts
Test yourself on Describe Core Data Concepts
The full Microsoft DP-900 question bank has 503 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Microsoft. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.