Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5842447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:01:09+00:00 2026-05-22T12:01:09+00:00

Using Windows Azure Table Storage (WATS) and trying to update the app to use

  • 0

Using Windows Azure Table Storage (WATS) and trying to update the app to use Azure. I’ve read many articles, and am not sure on the best approach for this, that is parent to child in a self referencing model.

ie a single parent message could have many child sub-messages. In a DB model, it would be a self referencing table.

How would I best structure this for WATS so that when I make a query “Give me 10 parent records”, it will also return all the child-messages belonging to the parent…

The entity of the message / submessage as below. I’ve tried to define the PK and RK as below:

public class TextCacheEntity : AzureTableEntity // custom table inherits AzureTableEntity
{
    public override void GenerateKeys()
    {
        PartitionKey = string.Format("{0}_{1}_{2}", MessageType, AccountId.PadThis(), ParentMessageId );
        RowKey = string.Format("{0}_{1}", DateOfMessage.Ticks.ReverseTicks(), MessageId);
    }
    public string MessageType { get; set; }
    public int AccountId { get; set; }
    public DateTime DateOfMessage { get; set; }
    public string MessageId { get; set; }
    public string ParentMessageId { get; set; }
    // other properties...
}

I thought of an implementation so the child messages store the parentMessagesId, and the parent parentMessageId would be empty.

The pattern would then be

  1. Get the parent messages

    .Where(o => o.ParititionKey == "Parent_000000000000001_").Take(10)
    
  2. Get the child messages. Iterate through all the parent messages and using a parallel for loop

    .Where(o => o.ParititionKey == "Child_000000000000001_" + parentMessageId)
    

But the problem is that this will result in 11 queries !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T12:01:09+00:00Added an answer on May 22, 2026 at 12:01 pm

    See this example by Scott Densmore:

    http://scottdensmore.typepad.com/blog/2011/04/multi-entity-schema-tables-in-windows-azure.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Windows Azure Table Storage. I am wondering, if I could use
I'm building an app using Windows Azure Table. I've encapsulated all my calls to
I am working a sample application using Windows Azure table storage. I will try
I am attempting to write to Azure Table Storage without using the TableContext and
I am working with Windows Azure and am just using the Blob Storage. I
I am using DotNetOpenAuth to authenticate an app on Windows Azure. From time to
Using Windows Azure's Microsoft.Web.DistributedCache.DistributedCacheOutputCacheProvider as the outputCache provider for an MVC3 app. Here is
I'm pretty sure this is a limitation of the Windows Azure SDK (Using the
I want to use Powershell to insert entities into Azure Table Storage and therefore
trying to migrate my existing asp.net website which is using mysql to Windows Azure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.