210 likes | 345 Views
SQL Data Services (SDS). Azure Services Platform. Azure ™ Services Platform. Azure ™ Services Platform. Agenda. Database ACE model Datatypes Administration and API (REST and SOAP interface) Tools (Windows) Roadmap. So w hat is it?. Sql Data Services
E N D
SQL Data Services (SDS) Azure Services Platform
Agenda • Database • ACE model • Datatypes • Administration and API (REST and SOAP interface) • Tools (Windows) • Roadmap
So what is it? • Sql Data Services • A database ..... However not a RDBMS! • Current setup in CTP: • Each user will be allowed 50Gb of storage across all Authorities • 1000 Containers per Authority • 1Gb of Blob Entities per Container (up from 500mb) • 100mb of Flexible Entities per Container (up from 20mb) • Each Blob Entity will be capped at 100mb
ACE Containment Model • Authority • Containers • Entities Container Entity Entity Entity Authority Entity Container LB
Supported datatypes • Type system is W3 Xml Schema • string • boolean • dateTime • decimal • base64Binary • + • ……………………………………….. Blob Sql Data Services A database ..... However not a RDBMS!
Administration and API • REST • SOAP
REST Create - HTTP Post Authority: <s:Authority xmlns:s="http://schemas.microsoft.com/sitka/2008/03/"> <s:Id>myCRMDatabase</s:Id> </s:Authority> Container: <s:Container xmlns:s="http://schemas.microsoft.com/sitka/2008/03/"> <s:Id>myCustomers</s:Id> </s:Container>
REST Create - HTTP Post (2) Entities: <Entity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:s="http://schemas.microsoft.com/sitka/2008/03/"> <s:Id>id234985798</s:Id> <kind xsi:type='x:string'>customer</kind> <firstname xsi:type='x:string'>Jens</firstname> <surname xsi:type='x:dateTime'>Jensen</surname> <status xsi:type='x:string'>Gold member<status/> </Entity> Or <customer xmlns:s='http://schemas.microsoft.com/sitka/2008/03/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:x='http://www.w3.org/2001/XMLSchema' > <s:Id>id234985798</s:Id> <kind xsi:type='x:string'>customer</kind> <firstname xsi:type='x:string'>Jens</firstname> <surname xsi:type='x:dateTime'>Jensen</surname> <status xsi:type='x:string'>Gold member<status/> </customer>
REST Delete - HTTP Delete • Authority: • Not Supported! • Container: • https://{AuthorityID}.data.database.windows.net/v1/{ContainerID} • Entity: • https://{AuthorityID}.data.database.windows.net/v1/{ContainerID}/{EntityID}
REST Update - HTTP Put • Entity: • https://{AuthorityID}.data.database.windows.net/v1/{ContainerID}/{EntityID} • <Entity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:s="http://schemas.microsoft.com/sitka/2008/03/"> • <s:Id>7234985798</s:Id> • <kind xsi:type='x:string'>customer</kind> • <firstname xsi:type='x:string'>Jens</firstname> • <surname xsi:type='x:dateTime'>Jensen</surname> • <status xsi:type='x:string'>Gold member<status/> • <gender xsi:type='x:string'>Male<gender/> • </Entity>
REST Retrive - HTTP Get • Authority: • https://{AuthorityID}.data.database.windows.net/v1/ • Container: • https://{AuthorityID}.data.database.windows.net/v1/{ContainerID} • Entity: • https://{AuthorityID}.data.database.windows.net/v1/{ContainerID}/{EntityID}
SOAP - CRUD pattern Metadata infomation (WSDL’s) Access and authentication: https://database.windows.net/soap/v1/ ...imports messaging and CRUD pattern interface: https://database.windows.net/soap/v1/schemas.microsoft.com.sitka.2008.03.wsdl
Query • General syntax: • from e in entities [where condition] [orderby property 1 [,property 2, …]] select e • Comparison Operators: • >, >=, <, <=, ==, != • Logical operators: • && (and), || (or),! (not) • Syntax difference - mandatory system entity metadata vs entity properties: • from e in entities where e.Id == "id234985798" select e • or • from e in entities where e["firstname"] == "Jens" select e
Query helpers Ofkind(): from e in entities.OfKind(”customer”) select e Take(): (from e in entities where e[“firstname”] == “Jens" select e).Take(10) Take(from e in entities.OfKind(“customer“) select e, 10) Join support: from c in entities.OfKind(“customer“) where c[“firstname"] == “Jens" from o in entities.OfKind(“order“) where o[“customerId"] == c.Id select o
REST Query • Containers • All containers in Authority: • https://{AuthorityID}.data.database.windows.net/v1/?q= • Container “customer”: • https://{AuthorityID}.data.database.windows.net/v1/?q="from%20e%20in% 20entities%20where%20e.Id==“customer"%20select%20e" • Entities • All entities in container: • https://{authority-id}.data.database.windows.net/v1/{container-id}?q='' • Select specific entity: • https://{AuthorityID}.data.database.windows.net/v1/{containerid}?q="from %20e%20in%20entities%20where%20e.Id==“id23243532"%20select%20e"
SOAPQuery <wsdl:message name="ISitkaSoapService_Query_InputMessage"> <wsdl:part name="parameters" element="tns:Query" /> </wsdl:message> <xs:element name="Query"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="scope" type="tns:Scope" /> <xs:element minOccurs="0" name="query" nillable="true" type="xs:string" /> </xs:sequence> </xs:complexType> </xs:element> ...and the same query string as the REST examples!
SDS Tools .Net SQL Data Services SDK (Windows only) Command line utility + SSDS Explorer SDS Documentation (not complete): http://msdn.microsoft.com/en-us/library/cc512417.aspx .Net SQL Data Services SDK: http://www.microsoft.com/downloads/details.aspx?FamilyId=0B1FA5C6-EC9D-440B-939E-481DD05F2627&displaylang=en Ruby SDK 3.part: http://github.com/sdsteam/sds-rest/tree/master
Åbenhed Azure™ Services Platform