Get startedGet started for free

Table Storage

1. Table Storage

Welcome back! In this video, we’ll explore Azure Table Storage.

2. Table storage

Microsoft's NoSQL key-value store for structured, non-relational data. You'll learn when to use it, how it compares to Cosmos DB, and how to perform core operations.

3. Understanding Table storage

In this video and following exercises you will learn to: Identify when to use Azure Table Storage versus Cosmos DB. Understand how Table Storage structures data using tables, entities, and properties. And perform basic create, read, update, and delete operations in a Table.

4. What is Table storage?

Azure Table Storage is Microsoft's NoSQL key-value store for storing massive amounts of structured, non-relational data. Perfect for lightweight scenarios such as, logs IoT telemetry or configuration settings. It's ideal for simple, fast, and cost-effective lookups without needing a complex schema or relationships.

5. When to use Table storage

Use Table Storage when your application needs quick access to structured data using simple key-value lookups, like Cipher Coffee's user preferences such as favorite drink or notification settings, IoT telemetry, or configuration data: but doesn't require rich querying or transactions. It's a great fit when cost and simplicity matter most over complex querying.

6. When to use Cosmos DB instead?

Choose Cosmos DB when you need advanced querying, global distribution, or multi-model data access, It supports global replication with fast speeds and rich indexing, more suitable for workloads that require high performance, large scale operations. for example, when you need to support APIs like MongoDB or Cassandra, or you need millisecond read/write latencies worldwide. Higher performance, however, comes at a higher cost.

7. Data organization

In Table Storage, data is organized into tables made up of entities, which are like rows, and properties, which are like columns. Every entity must include a PartitionKey and a RowKey, which uniquely identify each record, which makes querying fast and efficient even at scale!

8. CRUD operations

You can interact with Table Storage through the Azure Portal, SDKs, REST API, or the Azure Storage Explorer tool. CRUD operations let you manage entities efficiently without managing indexes or schema changes.

9. Create example

To create an entity, specify a unique PartitionKey and RowKey. For example, adding a customer record to Cipher Coffee's Table storage might look like this: A customer who has joined the loyalty program and earned 120 points, also storing the Partition Key, Row Key, Name.

10. Querying

You can query entities based on the PartitionKey, RowKey, or any property. For instance, this query retrieves all records for CustomerA.

11. Update and Delete

Updating and deleting are just as straightforward. You update an entity by replacing its values, and delete it using its keys. Together, CRUD operations form the foundation for working with Table Storage

12. Key takeaways

Let's recap, use Table Storage when you need simple, scalable, cost-efficient storage for structured data. Every record uses a PartitionKey and RowKey for fast access. Use Cosmos DB when you need global scale, complex queries, or multiple APIs. Both services can complement each other in hybrid data architectures.

13. Let's practice!

Let's jump in and use Table storage!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.