Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Azure

SQL Azure and relational data : Common SQL Azure scenarios

3/21/2011 6:18:31 PM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
People are using SQL Azure in their applications in two general scenarios: near data and far data. These terms refer to how far away the code that’s calling into SQL Server is from the data. If it’s creating the connection over what might be a local network (or even closer with named pipes or shared memory), that’s a near-data scenario. If the code opening the connection is anywhere else, that’s a far-data scenario.

1. Far-data scenarios

The most common far-data scenario is when you’re running your application, perhaps a web application, in an on-premises data center, but you’re hosting the data in SQL Azure. You can see this relationship in figure 1. This is a good choice if you’re slowly migrating to the cloud, or if you want to leverage the amazing high availability and scale SQL Azure has to offer without spending $250,000 yourself.

Figure 1. A web server using SQL Azure in a far-data scenario. The data is far away from the code that’s using it. In this case, the web server is on-premises, and the data is in the cloud with SQL Server.


In a far-data scenario, the client doesn’t have to be a web browser over the internet. It might be a desktop WPF application in the same building as the web server, or any other number of scenarios. The one real drawback to far data is the processing time and latency of not being right next to the data. In data-intensive applications this would be a critical flaw, whereas in other contexts it’s no big deal.

Far data works well when the data in the far server doesn’t need to be accessed in real time. Perhaps you’re offloading your data to the cloud as long-term storage, and the real processing happens onsite. Or perhaps you’re trying to place the data where it can easily be accessed by many different types of clients, including mobile public devices, web clients, desktop clients, and the like.

2. Near-data scenarios

A near-data scenario would be doing calculations on the SQL Server directly, or executing a report on the server directly. The code using the data runs close to the data. This is why the SQL team added the ability to run managed code (with CLR support) into the on-premises version of SQL Server. This feature isn’t yet available in SQL Azure. Figure 2 shows what a near-data scenario looks like.

Figure 2. Hosting a data service in an Azure web role helps your application be in a near-data scenario. This improves the performance of the application when it comes to working with the data.


One way to convert a far-data application to a near-data one is to move the part of the application accessing the code as close to the data server as possible. With SQL Azure, this means creating a services tier and running that in a role in Azure. Your clients can still be web browsers, mobile devices, and PCs, but they will call into this data service to get the data. This data service will then call into SQL Server. This encapsulates the use of SQL Azure, and helps you provide an extra layer of logic and security in the mix.

3. SQL Azure versus Azure Tables

SQL Azure and the Azure Table service have some significant differences . These differences help make it a little easier to pick between SQL Azure and Azure Tables, and the deciding factor usually comes down to whether you already have a database to migrate or not.

If you do have a local database, and you want to keep using it, use SQL Azure. If moving it to the cloud would require you to refactor some of the schema to support partitioning or sharding, you might want to consider some options.

If size is the issue, that would be the first sign that you might want to consider Azure Tables. Just make sure the support Tables has for transactions and queries meets your needs. The size limit surely will be sufficient, at 100 TB.

If you’re staying with SQL (versus migrating to Azure Tables) and are going to upgrade your database schema to be able to shard or partition, take a moment to think about also upgrading it to support multitenant scenarios. If you have several copies of your database, one for each customer that uses the system, now would be a good time to add the support needed to run those different customers on one database, but still in an isolated manner.

If you’re building a new system that doesn’t need sophisticated transactions, or a complex authorization model, then using Azure Tables is probably best. People tend to fall into two groups when they think of Tables. They’re either from “ye olde country” and think of Tables as a simple data-storage facility that’ll only be used for large lookup tables and flat data, or they’re able to see the amazing power that a flexible schema model and distributed scale can give them. Looking at Tables without the old blinders on is challenging. We’ve been beaten over the head with relational databases for decades, and it’s hard to consider something that deviates from that expected model. The Windows Azure platform does a good job of providing a platform that we’re familiar and comfortable with, while at the same time giving us access to the new paradigms that make the cloud so compelling and powerful.

The final consideration is cost. You can store a lot of data in Azure Tables for a lot less money than you can in SQL Azure. SQL Azure gives you a lot more features to use (joins, relationships, and so on), but it does cost more.

Other -----------------
- SQL Azure and relational data : Limitations of SQL Azure
- SQL Azure and relational data : Migrating an application to SQL Azure
- SQL Azure and relational data : Managing your database
- Authentication and Authorization with WCF (part 3) - Claims-Based Authorization
- Authentication and Authorization with WCF (part 2) - Role-Based Authorization
- Authentication and Authorization with WCF (part 1) - Direct and Brokered Authentication
- Connecting in the cloud with AppFabric : Listening for messages on the bus
- Connecting in the cloud with AppFabric : Connecting with the Service Bus
- Example: A return to our string-reversing service (part 4) - Configuring the ACS namespace
- Example: A return to our string-reversing service (part 3) - Sending a token as a client & Attaching the token
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server