Working with Data in the Surveys Application in C#.NET

Printer QR-Code in C#.NET Working with Data in the Surveys Application

Working with Data in the Surveys Application
QR Code 2d Barcode Creation In Visual C#
Using Barcode encoder for VS .NET Control to generate, create QR Code 2d barcode image in .NET framework applications.
www.OnBarcode.com
Scanning Quick Response Code In C#.NET
Using Barcode recognizer for .NET Control to read, scan read, scan image in Visual Studio .NET applications.
www.OnBarcode.com
This chapter describes how the Surveys application uses data. It first describes the data model used by the Surveys application and then discusses why the team at Tailspin chose this particular approach with reference to a number of specific scenarios in the application. It also describes how the developers ensured the testability of their solution. Finally, it describes how and why the application uses SQL Azure .
Bar Code Printer In Visual C#
Using Barcode generation for .NET Control to generate, create barcode image in Visual Studio .NET applications.
www.OnBarcode.com
Bar Code Reader In C#.NET
Using Barcode scanner for Visual Studio .NET Control to read, scan read, scan image in Visual Studio .NET applications.
www.OnBarcode.com
A Data Model for a Multi-Tenant Application
QR Code Creation In .NET Framework
Using Barcode creation for ASP.NET Control to generate, create QR Code ISO/IEC18004 image in ASP.NET applications.
www.OnBarcode.com
Encoding QR-Code In VS .NET
Using Barcode creator for Visual Studio .NET Control to generate, create QR Code image in VS .NET applications.
www.OnBarcode.com
This section describes the data model in the surveys application and explains how the table design partitions the data by tenant. The Surveys application uses a mix of table storage and BLOB storage to store its data. The sections, Saving Survey Response Data and Paging through Survey Results, later in this chapter discuss why the application uses BLOB storage for some data. Figure 1 shows, at a high level, which data is stored in the different storage types.
Making QR-Code In Visual Basic .NET
Using Barcode encoder for .NET framework Control to generate, create QR Code image in VS .NET applications.
www.OnBarcode.com
PDF 417 Printer In Visual C#
Using Barcode creation for VS .NET Control to generate, create PDF417 image in VS .NET applications.
www.OnBarcode.com
The Surveys application uses BLOB and table storage.
Creating UCC - 12 In Visual C#.NET
Using Barcode drawer for Visual Studio .NET Control to generate, create UCC - 12 image in Visual Studio .NET applications.
www.OnBarcode.com
Data Matrix Drawer In Visual C#.NET
Using Barcode maker for VS .NET Control to generate, create Data Matrix image in VS .NET applications.
www.OnBarcode.com
ch a pter fi v e
Code 39 Full ASCII Maker In C#
Using Barcode generation for .NET Control to generate, create Code 39 Full ASCII image in VS .NET applications.
www.OnBarcode.com
Drawing ISSN In C#
Using Barcode generator for VS .NET Control to generate, create International Standard Serial Number image in VS .NET applications.
www.OnBarcode.com
tenants (container) 1 blob/tenant
Drawing PDF 417 In Visual Studio .NET
Using Barcode creator for ASP.NET Control to generate, create PDF-417 2d barcode image in ASP.NET applications.
www.OnBarcode.com
Paint Barcode In .NET Framework
Using Barcode maker for ASP.NET Control to generate, create barcode image in ASP.NET applications.
www.OnBarcode.com
surveyanswers-tenant-survey (container) 1 container/survey 1 blob/answer Surveys (table) 1 row/survey 1
GS1 - 12 Creator In Objective-C
Using Barcode generation for iPad Control to generate, create UPC Code image in iPad applications.
www.OnBarcode.com
EAN13 Recognizer In Java
Using Barcode reader for Java Control to read, scan read, scan image in Java applications.
www.OnBarcode.com
surveyanswerslists (container) 1 blob/survey
Data Matrix ECC200 Generator In VB.NET
Using Barcode printer for .NET framework Control to generate, create ECC200 image in .NET applications.
www.OnBarcode.com
Generating Bar Code In Java
Using Barcode generator for BIRT reports Control to generate, create barcode image in Eclipse BIRT applications.
www.OnBarcode.com
* Questions (table) 1 row/question surveyanswerssummaries (container) 1 blob/survey
Painting ANSI/AIM Code 39 In Java
Using Barcode generator for Android Control to generate, create Code 39 image in Android applications.
www.OnBarcode.com
EAN-13 Drawer In Java
Using Barcode drawer for Android Control to generate, create EAN / UCC - 13 image in Android applications.
www.OnBarcode.com
figure 1 Data storage in the Surveys application
The Surveys application stores the definition of surveys in two Windows Azure tables. This section describes these tables and explains why Tailspin adopted this design. The following table describes the fields in the Surveys table. This table holds a list of all of the surveys in the application.
Field name PartitionKey RowKey Notes This field contains the tenant name. Tailspin chose this value because they want to be able to filter quickly by tenant name. This field contains the tenant name from the PartitionKey field concatenated with the slugified version of the survey name. This makes sure that a subscriber cannot create two surveys with the same name. Two subscribers could choose the same name for their surveys. Windows Azure table storage automatically maintains the value in this field. The slugified version of the survey name. This field records when the subscriber created the survey. This will differ from the Timestamp value if the subscriber edits the survey. The survey name.
storing survey definitions
A slug name is a string where all whitespace and invalid characters are replaced with a hyphen (-). The term comes from the newsprint industry and has nothing to do with those things in your garden!
Timestamp SlugName CreatedOn
Title
wor king with data in the surv eys a pplication
The following table describes the fields in the Questions table. The application uses this table to store the question definitions and to render a survey.
Field name PartitionKey Notes This field contains the tenant name from the PartitionKey field in the Surveys table concatenated with the slugified version of the survey name. This enables the application to insert all questions for a survey in a single transaction and to retrieve all the questions in a survey quickly from a single partition. This field contains a formatted tick count concatenated with position of the question within the survey. This guarantees a unique RowKey value and defines the ordering of the questions. Windows Azure table storage automatically maintains the value in this field. The question text. The question type: Simple text, multiple choice, or five stars (a numeric range). This field contains a list of the possible answers if the question is a multiple-choice question. Remember that Windows Azure table storage only supports transactions within a single partition on a single table.
RowKey
Timestamp Text Type PossibleAnswers
To read a more detailed discussion of RowKeys and PartitionKeys in Windows Azure table storage, see 5, Phase 2: Automating Deployment and Using Windows Azure Storage, of the book, Windows Azure Architecture Guide, Part 1: Moving Applications to the Cloud, available at http://msdn.microsoft.com/en-us/library/ff728592.aspx. The Surveys application saves tenant data in BLOB storage in a container named tenants. The following code shows the Tenant class; the application serializes Tenant instances to BLOBs identified by the subscriber s name (the term tenant is used in the storage classes to refer to subscribers).
[Serializable] public class Tenant { public string ClaimType { get; set; } public string ClaimValue { get; set; }
Copyright © OnBarcode.com . All rights reserved.