Azure Tables(開発者向けの仕組み)
クラウドコンピューティングの広大な風景において、データストレージは現代のアプリケーションのアーキテクチャとスケーラビリティを形作る重要な役割を果たします。 Azure Table Storageは、マイクロソフトのAzureによって提供される完全に管理されたNoSQLデータストアで、クラウド内で構造化データを保存するための柔軟なソリューションを開発者に提供します。 Azure Table Storageの機能、使用例、および利点を探る旅に出かけましょう。
Azure Table Storageを理解する
Azure Table Storageは、構造化データをスキーマレスで保存するクラウドベースのNoSQLデータベースサービスです。 Azure Tablesはキーと値のペアに基づいたデータモデルを提供し、各エンティティはパーティションキーと行キーで一意に識別されます。 この設計により、効率的なデータクエリと取得が可能になり、大規模データセットへの素早いアクセスが必要なシナリオに最適です。
構造化データを管理するためにAzure Table Storageとリレーショナルデータベースのどちらを選ぶべきか迷っている場合、Azure Table Storageは大規模データセットを扱う能力とAzureエコシステムとの統合により、開発者のツールキットに便利です。
主要な機能と能力
-
スキーマレス設計: 従来のリレーショナルデータベースとは異なり、Azure Table Storageはデータに対してスキーマを強制しません。 この柔軟性により、開発者は同じテーブル内で異なる構造のエンティティを保存でき、アジャイル開発を促進し、進化するデータ要件に対応できます。
-
スケーラビリティとパフォーマンス: Azure Table Storageは、スケーラビリティを重視して設計されており、大量のデータを容易に処理できます。 自動でスケーリングして増加する作業負荷に対応し、予測可能なパフォーマンスを提供するため、高スループットのアプリケーションや低レイテンシーのデータアクセスが求められるシナリオに適しています。
-
パーティショニングと負荷分散: Azure Table Storageのデータはパーティションキーに基づいてパーティショニングされ、複数のストレージノード間で効率的にデータを分散させます。 このパーティショニング戦略により、水平スケーラビリティと負荷分散が可能になり、最適なパフォーマンスとリソース利用率を確保します。
-
セカンダリインデックス: Azure Table Storageは主にパーティションキーと行キーをデータ取得に使用しますが、複合キーやクエリ投影を通じてセカンダリインデックスもサポートします。 この機能により、開発者は効率的な範囲クエリを実行したり、セカンダリ属性に基づいてデータをフィルタリングしたりでき、データアクセスパターンの柔軟性が向上します。
-
Azureエコシステムとの統合: Azure Table StorageはAzure Functions、Azure Cosmos DB、Azure Logic Appsなどの他のAzureサービスとシームレスに統合し、開発者がエンドツーエンドのソリューションを簡単に構築できます。 サーバーレス機能でデータストリームを処理したり、高度な分析ツールでデータを分析したりする際に、Azure Table Storageはスケーラブルで強靭なアプリケーションを構築するための基盤コンポーネントとして機能します。
ユースケース
Azure Table Storageは、さまざまな業界の幅広いユースケースに対応しています:
-
モノのインターネット(IoT): Azure Table Storageは、IoTデバイスからのテレメトリデータを保存するのに最適で、リアルタイムのデータ収集、分析、可視化を可能にします。 そのスケーラビリティとパフォーマンスは、IoTデプロイメントによって生成される大規模なデータ量を処理するのに理想的です。
-
コンテンツ管理: ブログ、記事、ユーザー生成コンテンツなど、コンテンツメタデータを構造化ストレージするアプリケーションのためには、Azure Table Storageは費用対効果が高くスケーラブルなソリューションを提供します。 そのスキーマレス設計は、コンテンツ構造の変化を時間とともに受け入れる柔軟なスキーマ進化を可能にします。
-
セッション状態管理: Azure Table Storageは、Webアプリケーションのセッション状態データを保存して、分散型でスケーラブルなセッション管理ソリューションを提供します。 セッション状態をAzure Table Storageにオフロードすることで、開発者は負荷分散環境でのスケーラビリティ、フォールトトレランス、セッション親和性を改善できます。
-
分散システム: 分散システムのアーキテクチャにおいて、Azure Table Storageは、コンポーネント間の共有状態と調整を維持するための基盤データストアとして機能します。 そのパーティショニングとスケーラビリティの機能により、分散キャッシュ、構成管理、マイクロサービス間の調整が求められるシナリオに最適です。
IronPDFの紹介

IronPDFは、.NETプロジェクトでPDFドキュメントの生成、管理、抽出を可能にするC# PDFライブラリです。 ここにいくつかの重要な特徴を示します:
- HTMLからPDFへの変換:
- HTML、CSS、JavaScriptコンテンツをPDFドキュメントに変換します。
- 完璧なピクセルでのPDFを実現するChromeレンダリングエンジン。
- URL、HTMLファイル、またはHTML文字列を入力としてPDFを生成します。
2.画像とコンテンツの変換:
- 画像をPDFに、またはPDFから画像に変換します。
- 既存のPDFドキュメントからテキストと画像を抽出します。
- JPG、PNGなどの様々な画像形式をサポートします。
3.編集と操作:
- PDFのプロパティ、セキュリティ、権限を設定します。
- デジタル署名を追加します。
- メタデータと履歴の編集。
4.クロスプラットフォームサポート:
- .NET Core (8, 7, 6, 5, および 3.1+)、.NET Standard (2.0+)、および.NET Framework (4.6.2+) と動作します。
- Windows、Linux、およびmacOSと互換性があります。
- 簡単なインストールのためのNuGetで利用可能です。
IronPDFとAzure Tablesを使用してPDFドキュメントを生成する
まず、以下のようにVisual Studioを使用してコンソールアプリケーションを作成します。

プロジェクト名を入力します。

.NETバージョンを提供します。

IronPDFパッケージをNuGetパッケージマネージャからインストールします。

Azure TablesライブラリにアクセスするためにNuGetパッケージマネージャにあるAzure TablesクライアントライブラリAzure.Data.Tablesを使用します。 Azure Table ServiceクライアントはAzure Table Storageと対話するための機能を提供します。

Azure Storageアカウントを作成してAzure Tablesを開始します。

レビューして作成をクリックします。 Azure Tablesを使用してPDFドキュメントを生成するには、以下のコードをプログラムに入力します。
using Azure;
using Azure.Data.Tables;
using Azure.Data.Tables.Models;
using IronPdf;
using System;
using System.Linq;
using System.Threading.Tasks;
namespace CodeSample
{
public static class AzureTableDemo
{
public static async Task Execute()
{
var tableName = "IronDemo";
var connectionString = "DefaultEndpointsProtocol=https;AccountName=irondemo;AccountKey=9Pe6LJlkjA721VgWvSuRCMk+WJR5/kFoyPtR1ewjRsNbGJNJOmWYhCB32fakANmWeAcfyIg++iHl+AStDNYlGw==;EndpointSuffix=core.windows.net";
Console.WriteLine("Demo IronPDF with Azure.Data.Tables");
// Enable web security for PDF rendering
Installation.EnableWebSecurity = true;
// Instantiate PDF renderer
var renderer = new ChromePdfRenderer();
// HTML content for the PDF
var content = "<h1>Demo IronPDF with Azure.Data.Tables</h1>";
// Create a TableServiceClient using the connection string
content += "<h2>Create TableServiceClient</h2>";
var serviceClient = new TableServiceClient(connectionString);
content += "<p>var serviceClient = new TableServiceClient(connectionString);</p>";
// Create the table if it does not exist
content += "<h2>Create Table</h2>";
TableItem table = await serviceClient.CreateTableIfNotExistsAsync(tableName);
Console.WriteLine($"Created table: {table.Name}.");
content += $"<p>Created table: {table.Name}.</p>";
// Placeholder for delete table logic
content += "<h2>Deletes If Required</h2>";
// serviceClient.DeleteTable(tableName);
content += "<p>serviceClient.DeleteTable(tableName);</p>";
// Get a client reference to interact with the table
content += "<h2>Get Table Client</h2>";
var tableClient = serviceClient.GetTableClient(tableName);
content += "<p>var tableClient = serviceClient.GetTableClient(tableName);</p>";
// Define and add a new entity to the table
content += "<h2>Add Table Entity</h2>";
var tableEntity = new TableEntity { { "Book", "Awesome IronPDF Package" }, { "Price", 5.00 }, { "Quantity", 21 } };
tableEntity.PartitionKey = tableEntity["Book"].ToString();
tableEntity.RowKey = tableEntity["Price"].ToString();
content += "<p>new TableEntity() { { \"Book\", \"Awesome IronPDF Package\" }, { \"Price\", 5.00 }, { \"Quantity\", 21 } }</p>";
content += $"<p>tableEntity.PartitionKey = {tableEntity["Book"]}</p>";
content += $"<p>tableEntity.RowKey = {tableEntity["Price"]}</p>";
Console.WriteLine($"{tableEntity.RowKey}: {tableEntity["Book"]} costs ${tableEntity.GetDouble("Price")}.");
content += $"<p>{tableEntity.RowKey}: {tableEntity["Book"]} costs ${tableEntity.GetDouble("Price")}</p>";
// Add the entity to the table
tableClient.AddEntity(tableEntity);
content += "<p>Entity added.</p>";
// Query the table
content += "<h2>Query Table</h2>";
Pageable<TableEntity> queryResultsFilter = tableClient.Query<TableEntity>(filter: $"PartitionKey eq '{tableEntity.PartitionKey}'");
content += "<p>Using tableClient.Query<TableEntity></p>";
// Iterate and display queried entities
foreach (TableEntity qEntity in queryResultsFilter)
{
content += $"<p>{qEntity.GetString("Book")}: {qEntity.GetDouble("Price")}</p>";
Console.WriteLine($"{qEntity.GetString("Book")}: {qEntity.GetDouble("Price")}");
}
Console.WriteLine($"The query returned {queryResultsFilter.Count()} entities.");
content += $"<p>The query returned {queryResultsFilter.Count()} entities.</p>";
// Render HTML content as PDF
var pdf = renderer.RenderHtmlAsPdf(content);
// Save the PDF to a file
pdf.SaveAs("AwesomeAzureDataTables.pdf");
}
}
}Imports Azure
Imports Azure.Data.Tables
Imports Azure.Data.Tables.Models
Imports IronPdf
Imports System
Imports System.Linq
Imports System.Threading.Tasks
Namespace CodeSample
Public Module AzureTableDemo
Public Async Function Execute() As Task
Dim tableName = "IronDemo"
Dim connectionString = "DefaultEndpointsProtocol=https;AccountName=irondemo;AccountKey=9Pe6LJlkjA721VgWvSuRCMk+WJR5/kFoyPtR1ewjRsNbGJNJOmWYhCB32fakANmWeAcfyIg++iHl+AStDNYlGw==;EndpointSuffix=core.windows.net"
Console.WriteLine("Demo IronPDF with Azure.Data.Tables")
' Enable web security for PDF rendering
Installation.EnableWebSecurity = True
' Instantiate PDF renderer
Dim renderer = New ChromePdfRenderer()
' HTML content for the PDF
Dim content = "<h1>Demo IronPDF with Azure.Data.Tables</h1>"
' Create a TableServiceClient using the connection string
content &= "<h2>Create TableServiceClient</h2>"
Dim serviceClient = New TableServiceClient(connectionString)
content &= "<p>var serviceClient = new TableServiceClient(connectionString);</p>"
' Create the table if it does not exist
content &= "<h2>Create Table</h2>"
Dim table As TableItem = Await serviceClient.CreateTableIfNotExistsAsync(tableName)
Console.WriteLine($"Created table: {table.Name}.")
content &= $"<p>Created table: {table.Name}.</p>"
' Placeholder for delete table logic
content &= "<h2>Deletes If Required</h2>"
' serviceClient.DeleteTable(tableName);
content &= "<p>serviceClient.DeleteTable(tableName);</p>"
' Get a client reference to interact with the table
content &= "<h2>Get Table Client</h2>"
Dim tableClient = serviceClient.GetTableClient(tableName)
content &= "<p>var tableClient = serviceClient.GetTableClient(tableName);</p>"
' Define and add a new entity to the table
content &= "<h2>Add Table Entity</h2>"
Dim tableEntity As New TableEntity From {
{ "Book", "Awesome IronPDF Package" },
{ "Price", 5.00 },
{ "Quantity", 21 }
}
tableEntity.PartitionKey = tableEntity("Book").ToString()
tableEntity.RowKey = tableEntity("Price").ToString()
content &= "<p>new TableEntity() { { ""Book"", ""Awesome IronPDF Package"" }, { ""Price"", 5.00 }, { ""Quantity"", 21 } }</p>"
content &= $"<p>tableEntity.PartitionKey = {tableEntity("Book")}</p>"
content &= $"<p>tableEntity.RowKey = {tableEntity("Price")}</p>"
Console.WriteLine($"{tableEntity.RowKey}: {tableEntity("Book")} costs ${tableEntity.GetDouble("Price")}.")
content &= $"<p>{tableEntity.RowKey}: {tableEntity("Book")} costs ${tableEntity.GetDouble("Price")}</p>"
' Add the entity to the table
tableClient.AddEntity(tableEntity)
content &= "<p>Entity added.</p>"
' Query the table
content &= "<h2>Query Table</h2>"
Dim queryResultsFilter As Pageable(Of TableEntity) = tableClient.Query(Of TableEntity)(filter:= $"PartitionKey eq '{tableEntity.PartitionKey}'")
content &= "<p>Using tableClient.Query<TableEntity></p>"
' Iterate and display queried entities
For Each qEntity As TableEntity In queryResultsFilter
content &= $"<p>{qEntity.GetString("Book")}: {qEntity.GetDouble("Price")}</p>"
Console.WriteLine($"{qEntity.GetString("Book")}: {qEntity.GetDouble("Price")}")
Next qEntity
Console.WriteLine($"The query returned {queryResultsFilter.Count()} entities.")
content &= $"<p>The query returned {queryResultsFilter.Count()} entities.</p>"
' Render HTML content as PDF
Dim pdf = renderer.RenderHtmlAsPdf(content)
' Save the PDF to a file
pdf.SaveAs("AwesomeAzureDataTables.pdf")
End Function
End Module
End NamespaceImports Azure
Imports Azure.Data.Tables
Imports Azure.Data.Tables.Models
Imports IronPdf
Imports System
Imports System.Linq
Imports System.Threading.Tasks
Namespace CodeSample
Public Module AzureTableDemo
Public Async Function Execute() As Task
Dim tableName = "IronDemo"
Dim connectionString = "DefaultEndpointsProtocol=https;AccountName=irondemo;AccountKey=9Pe6LJlkjA721VgWvSuRCMk+WJR5/kFoyPtR1ewjRsNbGJNJOmWYhCB32fakANmWeAcfyIg++iHl+AStDNYlGw==;EndpointSuffix=core.windows.net"
Console.WriteLine("Demo IronPDF with Azure.Data.Tables")
' Enable web security for PDF rendering
Installation.EnableWebSecurity = True
' Instantiate PDF renderer
Dim renderer = New ChromePdfRenderer()
' HTML content for the PDF
Dim content = "<h1>Demo IronPDF with Azure.Data.Tables</h1>"
' Create a TableServiceClient using the connection string
content &= "<h2>Create TableServiceClient</h2>"
Dim serviceClient = New TableServiceClient(connectionString)
content &= "<p>var serviceClient = new TableServiceClient(connectionString);</p>"
' Create the table if it does not exist
content &= "<h2>Create Table</h2>"
Dim table As TableItem = Await serviceClient.CreateTableIfNotExistsAsync(tableName)
Console.WriteLine($"Created table: {table.Name}.")
content &= $"<p>Created table: {table.Name}.</p>"
' Placeholder for delete table logic
content &= "<h2>Deletes If Required</h2>"
' serviceClient.DeleteTable(tableName);
content &= "<p>serviceClient.DeleteTable(tableName);</p>"
' Get a client reference to interact with the table
content &= "<h2>Get Table Client</h2>"
Dim tableClient = serviceClient.GetTableClient(tableName)
content &= "<p>var tableClient = serviceClient.GetTableClient(tableName);</p>"
' Define and add a new entity to the table
content &= "<h2>Add Table Entity</h2>"
Dim tableEntity As New TableEntity From {
{ "Book", "Awesome IronPDF Package" },
{ "Price", 5.00 },
{ "Quantity", 21 }
}
tableEntity.PartitionKey = tableEntity("Book").ToString()
tableEntity.RowKey = tableEntity("Price").ToString()
content &= "<p>new TableEntity() { { ""Book"", ""Awesome IronPDF Package"" }, { ""Price"", 5.00 }, { ""Quantity"", 21 } }</p>"
content &= $"<p>tableEntity.PartitionKey = {tableEntity("Book")}</p>"
content &= $"<p>tableEntity.RowKey = {tableEntity("Price")}</p>"
Console.WriteLine($"{tableEntity.RowKey}: {tableEntity("Book")} costs ${tableEntity.GetDouble("Price")}.")
content &= $"<p>{tableEntity.RowKey}: {tableEntity("Book")} costs ${tableEntity.GetDouble("Price")}</p>"
' Add the entity to the table
tableClient.AddEntity(tableEntity)
content &= "<p>Entity added.</p>"
' Query the table
content &= "<h2>Query Table</h2>"
Dim queryResultsFilter As Pageable(Of TableEntity) = tableClient.Query(Of TableEntity)(filter:= $"PartitionKey eq '{tableEntity.PartitionKey}'")
content &= "<p>Using tableClient.Query<TableEntity></p>"
' Iterate and display queried entities
For Each qEntity As TableEntity In queryResultsFilter
content &= $"<p>{qEntity.GetString("Book")}: {qEntity.GetDouble("Price")}</p>"
Console.WriteLine($"{qEntity.GetString("Book")}: {qEntity.GetDouble("Price")}")
Next qEntity
Console.WriteLine($"The query returned {queryResultsFilter.Count()} entities.")
content &= $"<p>The query returned {queryResultsFilter.Count()} entities.</p>"
' Render HTML content as PDF
Dim pdf = renderer.RenderHtmlAsPdf(content)
' Save the PDF to a file
pdf.SaveAs("AwesomeAzureDataTables.pdf")
End Function
End Module
End Namespaceコードの説明
このコードは、Azure Table Storageと対話し、IronPDFを使用してPDFを生成する方法を示しています:
-
Azure テーブル ストレージの相互作用:
- Azure Table Storageに接続するためにAzure SDK .NET 向け(Azure.Data.Tables)を使用します。
- それから"IronDemo"という名前のテーブルが存在するかどうかを確認します; 存在しない場合は、それを作成します。
- テーブルに"Book"、"Price"、"Quantity"などのプロパティを指定して、新しいエンティティ(データベースの行に類似)を追加します。
- フィルター条件に基づいてエンティティを取得するためにテーブルをクエリします。
-
IronPDFによるPDF生成:
- IronPDFのChromePdfRendererを使用して、HTMLコンテンツをPDFファイルにレンダリングします。
- Azure Table Storage操作の詳細を含む動的HTMLコンテンツからPDFを生成します。

IronPDFのライセンス
アプリケーションを開始する前に以下のコードを追加します。 試用ライセンスはこちらで入手可能です。
IronPdf.License.LicenseKey = "IRONPDF-KEY";IronPdf.License.LicenseKey = "IRONPDF-KEY";Imports IronPdf
IronPdf.License.LicenseKey = "IRONPDF-KEY"Imports IronPdf
IronPdf.License.LicenseKey = "IRONPDF-KEY"試用ライセンスはここで入手できます。
結論
そのスキーマレス設計、水平スケーラビリティ、Azureエコシステムとのシームレスな統合により、Azure Table Storageは現代のビジネス環境の動的な要求に適応できる強靭でアジャイルなアプリケーションを構築する力を開発者に与えます。 IoTデータストリームの管理、コンテンツメタデータの保存、分散システムの調整に関係なく、Azure Table Storageはクラウドネイティブアプリケーションの可能性を完全に引き出すための多用途のプラットフォームを提供します。
組織が引き続きデジタルトランスフォーメーションイニシアチブを採用しクラウド移行を進める中で、Azure Table Storageは現代のデータストレージアーキテクチャの基盤として、イノベーションを促進し、データドリブンな世界でビジネスが成功するための支援を続けています。 IronPDFは、PDFドキュメントをプログラムで生成および操作するために使用される.NETライブラリです。
IronPDFは、プログラムでPDFドキュメントを作成および操作するために使用される.NETライブラリです。 これにより、開発者はHTML、ASPXページ、画像、およびテキストをPDFファイルに変換できます。 主な機能には、HTMLからPDFへの変換、PDF編集機能、さまざまな.NET環境のサポートが含まれ、.NETアプリケーション内でPDFドキュメントを生成し、処理するための汎用的なツールとなっています。
ジェイコブ・メラーはIron Softwareの最高技術責任者(CTO)であり、C# PDFテクノロジーを開拓する先見的なエンジニアです。Iron Softwareのコアコードベースを支えるオリジナル開発者として、彼は創業以来、会社の製品アーキテクチャを形成し、CEOのCameron Rimingtonとともに、会社をNASA、Tesla、および世界的な政府機関にサービスを提供する50人以上の会社に変えました。1999年にロンドンで最初のソフトウェアビジネスを開業し、2005年に最初 for .NETコンポーネントを作成した後、Microsoftのエコシステム全体で複雑な問題を解決することを専門としました。