Describe Core Data Concepts · Topic 2 of 4

Data Storage Options and File Formats

DP-900 storage options: delimited text, JSON, XML, blob, Avro, ORC and Parquet formats, relational and non relational databases, and the Azure store for each use.

  • 5 min
In a nutshell
  • CSV is delimited text, and each line is one row.
  • Parquet and ORC are columnar and suit analytics. Avro is row based.
  • A BLOB is a binary large object such as an image or video.

What it is

Data is kept either in files or in databases. A file store holds data as whole files in a chosen format. A database manages the data for you, with rules for reading, writing and protecting it.

The exam asks you to recognise the common file formats, the main kinds of database, and which Azure service suits each use.

Datato be keptFile storea format and a folderDatabaserules and queries

How it works

Common file formats

FormatWhat it isGood for
Delimited text (CSV, TSV)Plain text, one row per line, values split by a comma or tabSimple tables, easy exchange
JSONText with named properties, nested objects and arraysWeb data, flexible records
XMLText with opening and closing tags and attributesOlder systems, documents with structure
BLOBBinary large object: images, video, audio, application filesUnstructured content
AvroCompact binary format that stores rows, with its schema in a JSON headerStreaming and record by record writes
ORCColumnar binary format, built for Hive readsLarge analytical reads
ParquetColumnar binary format with strong compressionAnalytics over big datasets

A columnar format stores each column together instead of each row together. A query that needs only two columns of fifty can then skip the rest, which is why Parquet and ORC are popular for analytics.

Types of database

Relational databases store structured data in tables with rows and columns. Relationships between tables are defined with keys, and you query with SQL.

Non relational databases (also called NoSQL) store data in other shapes and scale out easily.

TypeStores data asExample use
Key valueA unique key that points to a valueShopping carts, session data
DocumentSelf describing JSON style documentsProduct catalogues, user profiles
Column familyRows holding columns grouped into familiesLarge time based data, sensor logs
GraphNodes joined by edgesSocial networks, recommendations

Azure data stores by use case

NeedAzure service
Relational data, transactions, SQLAzure SQL Database or Azure SQL Managed Instance
Open source relational dataAzure Database for PostgreSQL or MySQL
Flexible documents with global reachAzure Cosmos DB
Unstructured files and imagesAzure Blob Storage
A data lake for analyticsAzure Data Lake Storage Gen2
File shares reached over SMB or NFSAzure Files
Simple key and attribute data at low costAzure Table Storage

Azure Data Lake Storage Gen2 is built on Blob Storage with a hierarchical namespace added, so folders are real directories with permissions.

A worked scenario

A company records sensor readings every second. The team writes them as Avro files because Avro handles a stream of records well. Each night a job converts the day into Parquet, because analysts read a few columns across billions of rows. Customer orders sit in Azure SQL Database, where transactions need guaranteed accuracy. Equipment photos go to Blob Storage. Each need uses the format or store that fits it best.

File or database?

Choose a file store whenChoose a database when
Data is written once and read in bulkMany users read and write small pieces at once
The content is unstructured, such as videoYou need queries, indexes and constraints
You want the lowest storage costYou need transactions and guaranteed accuracy
Other tools will process the files laterThe application depends on fast, repeatable lookups

Why a columnar file reads less

A table of fifty columns and a billion rows has to be scanned to add up one column. A row based file must read every row in full, so most of the bytes read are not needed. A columnar file keeps each column together, so the query reads only the one column it needs, and values in a single column compress well because they look alike. That is why analytics favours Parquet and ORC, while record by record writes favour Avro.

One item in each non relational type

TypeAn example item
Key valueKey cart:4411, value is the contents of the cart
DocumentA JSON document for a product with its own list of attributes
Column familyA row key for a sensor, with a group of columns for readings and another for settings
GraphTwo nodes, Ana and Ben, joined by an edge labelled "friend of"

Limits of delimited text

A comma separated file has no data types, no way to mark a missing value from an empty string, and trouble when a value itself contains a comma. Quoting rules help, but different tools handle them differently. That is a main reason that larger analytical systems prefer typed formats such as Parquet.

What to remember for the exam

  • CSV is delimited text, and each line is one row.
  • Parquet and ORC are columnar and suit analytics. Avro is row based.
  • A BLOB is a binary large object such as an image or video.
  • The four non relational types are key value, document, column family and graph.
  • Azure Cosmos DB holds documents and other non relational models. Azure Blob Storage holds unstructured objects.
  • Data Lake Storage Gen2 adds a hierarchical namespace to Blob Storage.
Watch out

Do not confuse a data lake with a database. A lake holds files in their raw form and has no query engine of its own.

How the exam asks about this

  • "Which format stores data by column and suits analytics?" Parquet.
  • "Store images and video cheaply." Blob Storage.
  • "A key to look up a value, nothing else." A key value store.
  • "Data about relationships between people." A graph database.

Common mistakes

Choosing a relational database for every need. Documents, graphs and files each have a better home.

Thinking CSV carries data types. It is only text. The reader decides whether a value is a number or a date.

Mixing up columnar and column family. Columnar describes a file layout. Column family is a type of non relational database.

Treating Table Storage as relational. It stores entities by key and attribute, with no joins or foreign keys.

Check yourself

  • Which file formats are columnar?

    Parquet and ORC.

  • Which kind of database stores nodes and the edges between them?

    A graph database.

  • Which Azure service stores unstructured objects such as images and backups?

    Azure Blob Storage.

Topic 2 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.