Windows Azure SQL Database Data Access
Microsoft Windows Azure SQL Database is the relational database service on the Windows Azure platform. There are many ways to incorporate Windows Azure SQL Database in your database application. This topic describes some general examples of how your database application can access data in Windows Azure SQL Database. For more information about the Windows Azure platform, see the Windows Azure platform Web site.
Accessing Data in SQL Database
In a traditional on-premise application, the application code and database are located in the same physical data center. SQL Database and the Windows Azure platform offer many alternatives to that architecture. The following diagram demonstrates two generalized alternatives available for how your application can access data with Windows Azure SQL Database.
In Scenario A on the left, your application code remains on the premises of your corporate data center, but the database resides in Windows Azure SQL Database. Your application code uses client libraries to access your database(s) in Windows Azure SQL Database. For more information about the client libraries that are available, see Guidelines and Limitations (Windows Azure SQL Database). Regardless of the client library chosen, data is transferred using tabular data stream (TDS) over a secure sockets layer (SSL).
In Scenario B on the right, your application code is hosted in the Windows Azure and your database resides in Windows Azure SQL Database. Your application can use the same client libraries to access your database(s) in Windows Azure SQL Database as are available in Scenario A. There are many different types of applications that you can host in the Windows Azure platform.
The Scenario B client premises may represent an end user's Web browser that is used to access your Web application. The Scenario B client premises may also be a desktop or Silverlight application that uses the benefits of the Entity Data Model and the WCF Data Services client to access your data that is hosted in Windows Azure SQL Database.
For more information about the SQL Database architecture, see Windows Azure SQL Database Architecture.
Hosting Your Data in the Cloud
The appearance and functionality of your SQL Server database experience is unchanged when you use SQL Database instead of an on-premise instance of SQL Server. There are some minor differences that include Transact-SQL changes and login management. For more information, see Transact-SQL Support (Windows Azure SQL Database) and Managing Databases and Logins in Windows Azure SQL Database.
When hosting only your data in the Microsoft data center, it is important to consider the network latency between SQL Database and the on-premise servers running your application code. Network latency to SQL Database is higher than it would be if the database were also on your premises and you may need to account for this in your application code.
One way to minimize the network latency of requests to the database is to additionally host your application in the Windows Azure platform.
Hosting Your Application in the Cloud
Hosting applications in Windows Azure is optional. Based on your needs, you can migrate your applications to or from Windows Azure. For more information about cloud computing, see Windows Azure Platform.
Hosting your application code in Windows Azure is beneficial to the performance of your application because it minimizes the network latency associated with your application's data requests to SQL Database.
For example, you may decide to create a Web-based user interface in Windows Azure for your database application that is hosted in SQL Database. In this scenario, the client code and data is hosted in the same physical data center, so network latency is minimal between the corresponding servers. Clients will still have to traverse the Internet to reach your database application, but the network traffic between the client code and data is much faster because those numerous data requests have a much shorter distance to travel.