Non Relational Data on Azure · Topic 2 of 3

Azure Files and Table Storage

DP-900 Azure Files and Table Storage: managed SMB and NFS file shares, Azure File Sync, key and attribute entities, partition and row keys, and Cosmos DB for Table.

  • 5 min
In a nutshell
  • Azure Files offers managed shares over SMB and NFS, and can be mounted from Windows, Linux and macOS.
  • Azure File Sync caches a share on a Windows file server.
  • Table Storage is a schemaless key and attribute store, with a PartitionKey and a RowKey.

What it is

Besides blobs, Azure Storage offers two more services the exam covers. Azure Files gives you managed file shares that behave like a network drive. Azure Table Storage is a simple, low cost NoSQL store for entities made of keys and attributes.

Both live in a storage account, next to Blob Storage.

Azure Filesshared drive in the cloudTable Storagekeys and attributesStorage accountholds both

How it works

Azure Files

Azure Files provides fully managed file shares in the cloud. You reach them with the standard file sharing protocols, SMB and NFS, so existing applications work without being rewritten. Shares can be mounted at the same time from Windows, Linux and macOS machines, in Azure or on premises.

SMB suits Windows, Linux and macOS clients. NFS is for Linux clients, which suits Linux workloads and containers. You can also reach a share through the REST interface.

Common uses include:

  • Replacing or extending file servers. A department share moves to Azure and nothing changes for users.
  • Lift and shift of applications that expect a shared drive for configuration or data.
  • Shared storage for containers or virtual machines.

Azure File Sync keeps a Windows file server and an Azure file share in step. Frequently used files are cached on the local server, while the full set stays in the cloud.

Azure Blob StorageAzure Files
Looks likeA bucket of objects reached over HTTPSA drive reached over SMB or NFS
Best forUnstructured data and big data lakesShared files for applications and users
Folder supportFlat unless hierarchical namespace is onReal folders and files

Azure Table Storage

Table Storage holds structured NoSQL data. It is a key and attribute store with a schemaless design. A table holds entities, and each entity is a set of properties, a little like a row, except that entities in one table can have different properties.

Every entity is identified by two keys.

KeyPurpose
PartitionKeyGroups entities that are stored and scaled together
RowKeyUniquely identifies the entity inside its partition

Queries are fast when they use the keys. Table Storage has no joins, no foreign keys and no stored procedures, and it is not a relational database. It is typically cheaper than a traditional SQL database for similar volumes of data, which makes it a good fit for flexible datasets such as user data for web apps, address books and device information.

PartitionKey: "Lisbon"   RowKey: "device-0042"   Model: "T-800"   Firmware: "2.1"

Moving up to Cosmos DB for Table

Applications written for Table Storage can use Azure Cosmos DB for Table with the same table model. It adds higher throughput, single digit millisecond latency and global distribution, at a higher price.

Choosing between the storage services

The needService
Images, video and backupsBlob Storage
A shared network drive for usersAzure Files
Lookup of small records by key at low costTable Storage
Messages passed between application partsQueue Storage
Global scale, low latency and richer queriesAzure Cosmos DB

A worked scenario

A company has a legacy application that reads its settings from a shared drive. It cannot be changed, so the team creates an Azure file share and mounts it on the application servers over SMB. A separate part of the system stores device status records, each looked up by device code. Those records have no relationships and need only fast key access, so Table Storage keeps cost low.

Using a share

Mounting a file share gives users a drive letter on Windows or a mount point on Linux. SMB uses TCP port 445, so a network that blocks that port cannot reach a share directly, and a VPN or private connection is the usual answer. Access can use a storage account key or identity based authentication with Microsoft Entra Domain Services or on premises Active Directory.

Tiers and redundancy

Azure Files has performance options, from premium shares on solid state drives for demanding workloads, to standard shares for general use, with transaction optimized, hot and cool choices. Like Blob Storage it supports redundancy choices such as LRS, ZRS and GRS, and share snapshots let you recover earlier versions of files.

Table Storage queries

QuerySpeed
By PartitionKey and RowKey togetherFastest, a point lookup
By PartitionKey onlyFast, reads one partition
On other propertiesSlower, may scan the whole table

Designing the keys well is therefore the main skill. For device data you might use the region as the PartitionKey and the device code as the RowKey, so that a lookup of one device is a point query and all devices in a region are one partition.

Table Storage compared with Cosmos DB for Table

Azure Table StorageCosmos DB for Table
PriceLowHigher
LatencyFastSingle digit millisecond
Global distributionRedundancy options onlyReplication to many regions
Secondary indexesOnly the two keysAutomatic indexing of all properties

What to remember for the exam

  • Azure Files offers managed shares over SMB and NFS, and can be mounted from Windows, Linux and macOS.
  • Azure File Sync caches a share on a Windows file server.
  • Table Storage is a schemaless key and attribute store, with a PartitionKey and a RowKey.
  • Table Storage has no joins, foreign keys or relationships.
  • Cosmos DB for Table is the premium option for Table applications.
Watch out

Do not call Table Storage a relational database because it says "table". It stores entities by key.

How the exam asks about this

  • "Replace an on premises file server with a cloud share." Azure Files.
  • "A cheap NoSQL store for key and attribute data." Table Storage.
  • "Which two keys identify an entity?" PartitionKey and RowKey.
  • "Keep a local copy of frequently used files." Azure File Sync.

Common mistakes

Choosing Blob Storage for a shared drive. Applications that expect a mounted file system need Azure Files.

Expecting relationships in Table Storage. It has none, and joins are not available.

Assuming every entity has the same columns. The design is schemaless, so properties may differ.

Treating NFS as a Windows option. NFS shares are for Linux clients. Windows uses SMB.

Check yourself

  • Which protocols does Azure Files support for shares?

    SMB and NFS.

  • Which two keys identify an entity in Table Storage?

    The PartitionKey and the RowKey.

  • Which service adds global distribution to the Table model?

    Azure Cosmos DB for Table.

Topic 2 of 3 in Non Relational Data on Azure

Test yourself on Non Relational Data on Azure

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.