广告位API接口通信错误,查看德得广告获取帮助

电竞之家_品味电竞生活移动版

主页 > 刀塔2 >

【第2篇】忘掉SQL Server 200X:Introducing SQL Data Services

举个实际例子,如上图所示,我们可以创建一个叫做 "food" 的 Authority,其下包括名为 "fruit" 和 "vegetable" 两个 Container.  Container["fruit"] 中包括 3 个实体,分别是 "apple1"、"apple2"、"pear1"。注意,这里我们假设五角星代表 pear,三角形代表 apple。这样,在这个  Container["fruit"] 就包括了两种类型的三个 Entity。同样,在 Container["vegetable"] 中,我们假设圆形是白菜 cabbage,方形是西红柿 tomato,我们又有了 "tomato1"、"tomato2"、"cabbage1" 三个 Entity,它们也属于两种不同类型。

跟传统的 instance-database-tabale-row 的模型很不一样吧?不要紧,现在先记住基本的结构就好了,在下一节,你会有机会动手把玩一下它们。

编程模型

每个 Authority 都对应特定的 URI。比如一个叫做 food 的 Authority,它的 HTTP 地址就是 https://food.data.database.windows.net/v1 ,可以直接在浏览器中打开(在浏览器 zhogn1 直接打开,等同于执行 HTTP 的 GET 方法)

有了 Authority 的 URI,你会发现,Container 和 Entity 的 URI 也很容易找到了。格式如下:

https://food.data.database.windows.net/v1/<container-id>
  如 https://food.data.database.windows.net/v1/fruit/

https://food.data.database.windows.net/v1/<container-id>/<entity-id>
  如 https://food.data.database.windows.net/v1/fruit/apple1

SDS 的编程模型,CRUD,说白了就是对以上这些 URI 的 HTTP 操作。下表是一个 HTTP Verb 到 SDS Operation 的映射 HTTP Verb  SDS Operation 
  GET   Fetch,Query,(即Select) 
  POST  Create,(即Insert) 
  PUT  Update 
  DELETE  Delete

(责任编辑:波少)
广告位API接口通信错误,查看德得广告获取帮助