version 1.8c (2008-11-26)
by Mike Amundsen
SDS Examples Home
Feedback for SDS Examples
Name
Select an existing SDS authority or press "Add" to create one.
Authorities are the unit of geo-location and billing within SDS. In the beta you can create as many as you would like. When the service goes live, you will receive a bill per Authority.
Currently, there is no support for deleting an Authority once it has been created.
Below is a list of all the Containers defined for the selected Authority. You can add a new Container or click on a link to view the Entities for an existing Container.
Below is a list of the (first 500) Entities for the selected Container. Press the Query button to filter the list. Press the All button to clear any existing query.
Deleting a Container will automatically delete all the Entities stored there. This cannot be 'undone.'
Replace {@kind} with your object name. Use $id$, $id-desc$, $guid$, or your own value for the s:Id element. Add flexible properties as needed. Be sure to include the data type (string, base64Binary, boolean, decimal, dateTime) for all flexible properties.
{@kind}
$id$, $id-desc$, $guid$
s:Id
string, base64Binary, boolean, decimal, dateTime
You can edit, add or remove flexible properties. Be sure to include the data type (string, base64Binary, boolean, decimal, dateTime) for all flexible properties. Do not change the value of the s:Id element.
>, >=, <, <=, ==, !=
&& (and), || (or), ! (not)
When querying metadata properties you use the '.' notation. In the following query, the condition in the where clause references the Id metadata property. The query retrieves a Flexible Entity with a specific Id value. from e in entities where e.Id == "someId" select e
from e in entities where e.Id == "someId" select e
The flexible properties are stored in the Properties collection of the entity. When querying over these properties you specify the property name using Indexer syntax. The following query retrieves all entities whose Age flexible property value is 32: from e in entities where e["Age"] == 32 select e
from e in entities where e["Age"] == 32 select e
User the orderby keyword to control the orderin which the entities are returned. from e in entities orderby e.Id, e["flexProp"] descending select e
orderby
from e in entities orderby e.Id, e["flexProp"] descending select e
SQL Data Services (SDS) containers can store entities of various kinds (heterogeneous containers). The Kind metadata property on each the entities can be used to distinguish among them. In a query a where clause can filter the entities based on kind. from c in entities.OfKind("Customer") select c
from c in entities.OfKind("Customer") select c
Take() function can be added to a query to restrict the number of entities returned. For example, the following query limits the number of entities returned to 10 by adding the Take() function in the expression. (from e in entities where e.Kind == "Customer" select e).Take(10)
(from e in entities where e.Kind == "Customer" select e).Take(10)
Join query support in SQL Data Services (SDS) allow you to retrieve entities from a container based on a join condition involving properties on different kinds of entities. from c in entities where c.Kind=="Customer" where c["Name"] == "Customer 1" from o in entities where o.Kind=="Order" where o["CustomerId"] == c.Id select o
from c in entities where c.Kind=="Customer" where c["Name"] == "Customer 1" from o in entities where o.Kind=="Order" where o["CustomerId"] == c.Id select o
User
Password
This Web application requires you to enter your SDS username and password in order to access your data on the remote SDS servers. The username and password are encrypted here on the client and then sent to the Web server via a cookie. The username and password are then decypted into memory on the Web server and are finally sent (via HTTPS) to the remote SDS server.
Although it is not likely, it is possible for someone to 'sniff' the traffic between your client and the target server at this moment to intercept the encrypted username and password. Also, while I give you my promise that the server code is not storing your username and password, it could be done.
If you are not comfortable with these circumstances, do not enter your SDS username and password into this screen.