Is there a TSQL equivalent for storing Azure tables? I want to add hock requests to .NET when property names are unknown at design time.
From my understatement of LINQ, you need to reference existing public properties.
var selectedOrders = from o in context.Orders where o.Freight > 30 orderby o.ShippedDate descending select o;
Freight and ShippedDate must be publicly available, defined at design time. I have no structured properties (or even structured classes).
What if I do not know the names of the properties at design time? You can add new property names to the table in a very convenient mode, but how can they be used?
You can define a dynamic request through the REST API
Request Syntax: GET /myaccount/Customers()?$filter=(Rating%20ge%203)%20and%20(Rating%20le%206)$select=PartitionKey,RowKey,Address,CustomerSince HTTP/1.1
Are there tools for using REST in .NET (dynamically)?
From the REST API documentation: Use the logical operators defined in the .NET Client Library for the ADO.NET Data Services Framework to compare a property with a value. Note that it is not possible to map a property to a dynamic value; one side of the expression must be constant. http://msdn.microsoft.com/en-us/library/windowsazure/dd894031.aspx
If you need to use SQL, if you need queries like TSQL, then OK.
I think I'm learning that Table Storage is designed to serialize classes (especially if you have many many instances to serialize). This link: http://msdn.microsoft.com/en-us/library/windowsazure/dd179423.aspx The schema for a table is defined as a C # class. This is the model used by ADO.NET Data Services. The scheme is known only to the client application and simplifies access to data. The server does not apply this scheme.
[DataServiceKey("PartitionKey", "RowKey")] public class Blog { // ChannelName public string PartitionKey { get; set; } // PostedDate public string RowKey { get; set; } // User defined properties public string Text { get; set; } public int Rating { get; set; } public string RatingAsString { get; } protected string Id { get; set; } }
The user will upload the file, which will go to the BLOB and string fields to describe the file. It must be able to scale to millions of records. There will only be a search in two required fields (properties): custID and package. No need to look for other fields, but I need to save them and let the user simply add new fields to the package. It needs to scale to millions of records, and therefore the BLOB repository is suitable for files. I think that I am leaving Table Storage - this is the ability to use REST on the client to load files and fields. You need to optimize up to 100,000 downloads at a time and support a reboot. The load will be relatively small batches, and it probably won't be REST, since I need to do some server-side validation validation.
What I'm going to do is two tables. Where the second is for dynamic data.
Master PartitionKey CustID RowKey GUID string batch string filename Fields PartitionKey CustID+Guid RowKey fieldName string value
The field name must be unique. Requests for Master will be by CustID or CustID and package. Field queries will be owned by PartitionKey. Comments please.