As mentioned in the previous article, SQL services is used as a medium and small application.ProgramDevelopment, you can completely forget the existence of SQL Server 200X. Is that amazing? Now, streamcompute trojan has a detailed understanding of what SQL services is.
In most cases, web applications depend on another database server. This database service must be maintained by professional IT personnel. Before you deploy an application, you need to consider too much: Does the data server have enough capacity? What is the performance? Stability and security? Load? There are too many other unknown factors...
Based on the basic concept of cloud computing, to solve the above problems, we need cloud-based data platform, that is, to put all data services on the cloud, which relies on powerful cloud operating systems and platform hardware for processing. By the way. SQL data services (SDS) is a cloud-based data platform.
What is SDS?
SDS is a powerful Internet-oriented database that provides strong, secure, and flexible database services. SDS provides two standard interfaces: soap and rest.Programming LanguageThis allows coder in any language to operate on it easily.
Why is SDS used?
Flexibility and scale, business-ready reliability and security, developer agility
SDS's position in azure services platform:
SDS is one of the four modules of azure. It provides data services for applications on the cloud and other azure services modules.
Data Types supported by SDS
SDS supports several basic data types, including string, decimal, Boolean, datetime, and binary. It also supports blob (Binary Large Object) data types, allows you to store content in any format.
Application address:
Http://go.microsoft.com /? Linkid = 9373222
Dev Portal
Http://portal.ex.azure.microsoft.com
Ace Model
Finally, I entered the key point. Before using SDS, you must understand the ACE (authority, container, entity) model of SDS. Authority is the highest level object. One authority contains multiple iner, and one container contains multiple entity. For example:
We can think of authoriy as a database instance (SQL server instance) in SQL Server ). Then, the container is like multiple independent databases in the instance. Entity is equivalent to a record. This analogy is just an intuitive concept. In fact, there are differences between the ace model and the relational database.
To make an accurate analogy, the container can be equivalent to an independent database in a relational database or a table. Entity is a data record, but entity is arbitrary and does not need to have a specific schema definition in a table like in a relational database. You can see that a container can containVariousDifferent entity structures.
For example, we can create an authority named "food", which contains two containers named "Fruit" and "vegetable. the container ["Fruit"] contains three entities: "apple1", "apple2", and "pear1 ". note: here we assume that the pentagram represents pear and the triangle represents apple. In this way, the container ["Fruit"] includes three entity types. Similarly, in container ["vegetable"], we assume that the circle is cabbage and the square is tomato, and we have "tomato1", "tomato2 ", "cabbage1" Three entity, which also belongs to two different types ..
The traditional instance-database-tabale-row model is quite different, right? It doesn't matter. Remember the basic structure first. In the next section, you will have a chance to play with them.
Programming Model
Each authority corresponds to a specific URI. For example, a Food Authority, its HTTP address is the https://food.data.database.windows.net/v1, can be opened directly in the browser (in the browser zhogn1 open directly, equivalent to executing the http get method)
With the URI of authority, you will find that the URI of container and entity is also easy to find. The format is as follows:
Https://food.data.database.windows.net/v1/ <container-ID>
Like https://food.data.database.windows.net/v1/fruit/
Https://food.data.database.windows.net/v1/ <container-ID>/<entity-ID>
Like https://food.data.database.windows.net/v1/fruit/apple1
The Programming Model of SDS, crud. To put it bluntly, it is the HTTP operation on these Uris. The following table shows the SDS ing from HTTP verb to SDS operation.
HTTP verb |
SDS operation |
Get |
Fetch, query, (I .e. select) |
Post |
Create, (insert) |
Put |
Update |
Delete |
Delete |
Now, this section is over. :) In the next section, I will use a small tool to play with all the functions of SDS.
Note: SQL data services is now renamed SQL Azure, and its functions remain unchanged.