Search This Blog

Loading...

Wednesday, June 16, 2010

SSAS Dimension Attribute Properties

There could not be any SSAS interview where at least one question is not asked about the dimension, attribute or measure properties. Many at times, I myself have kept on searching the web to find more information about a particular property only to find that the information is pretty scattered and you really have to spend some effort to consolidate all of them. Through this post, I will consolidate all relevant information regarding the attribute properties and try to put it under one roof.


Before you go forward and read, you might want to understand some of the terms that are going to keep coming in the explanations below:-
  • Attribute Hierarchy : Attributes and Attribute Hierarchies (MSDN)
  • Discrete Attributes and Contiguous Attributes : Quoted from Introduction to Attribute Discretization (William Pearson) - “ Whenever we work with attributes, we can expect to encounter two general types of values:
    • Discrete attributes: Discrete values stand apart distinctly, and have clearly defined logical “boundaries” between themselves. The possible values are naturally discrete for the lion’s share of attributes occurring in the business world.
      Example: The Gender attribute, within the Customer dimension of the Adventure Works sample UDM, is (at least for purposes of the sample cube) considered to have only one of two discrete values, female or male.
    • Contiguous attributes: Contiguous values do not stand apart distinctly, but flow along, as if in a continuous line. Contiguous values, especially within large populations, can have very large numbers of possible values. Information consumers can find it difficult to work effectively and efficiently within such wide ranges of values.
      Example: the Vacation Hours attribute, within the Employee dimension of the Adventure Works sample UDM, can have a wide range of possible values, depending upon how many employees are involved, whether there are limits on how many vacation days they can accumulate, and considerations of this nature. The member values are based directly upon the unique values contained within the VacationHours column of the DimEmployee table (with many of the unique values shared among multiple employees). The sheer number of values might make working with them cumbersome for information consumers, if they are simply made available in their existing state.

       

      Read more : here

Tuesday, June 15, 2010

FaceLight – Silverlight 4 Real-Time Face Detection

This article explains how to implement a simple facial recognition system using Silverlight 4’s new webcam feature in c#.

Introduction

The webcam and microphone API was the first thing I played with after the Silverlight 4 beta was released at last year’s PDC. In my opinion, it’s one of the coolest features. You can do a lot of fun Silverlight applications with it too.When the SLARToolkit was released, I finally had time to implement real time face detection using the Silverlight 4 webcam API. This article will describe the simple facial recognition method that searches for a certain sized skin color region in a webcam snapshot. This technique is not as perfect as a professional computer vision library like OpenCV and the Haar-like features they use, but it runs in real time and works for most webcam scenarios.

 

Demo Application

You need a webcam and at least the Silverlight 4 runtime installed to run the sample. At the moment the release candidate is available for Windows and Mac. The facial region should be illuminated well and the background should be in skin color contrast to get the best results.

Read more : here

SilverShader – Introduction to Silverlight and WPF Pixel Shaders

This article explains how to write pixel shaders for the Microsoft Silverlight and WPF platform with HLSL, as well as how to write an extensible Silverlight application for shader demos.

Introduction

Almost 10 years ago, Microsoft announced DirectX 8.0, including the huge real-time computer graphics milestone, Direct3D 8.0. Direct3D 8.0 introduced programmable shaders and gave the developers a chance to create never-before-seen effects and experiences apart from the fixed-function graphics pipeline. With Direct3D 8.0’s new shader capabilities, it became possible to compute neat custom-rendering effects on mainstream graphics hardware. Today’s graphics hardware is capable of running hundreds of shaders in parallel and modern games make heavy use of this technology t to achieve stunning effects. 

A shader is a rather small program, a so-called kernel function, typically executed in parallel for each data element. Pixel shaders, for example, are executed for each pixel of a bitmap, and therefore used to implement per-pixel effects. 

This introductory article will explain how to write pixel shaders for Silverlight and WPF, what tools should be used, and how to work with the tools. Furthermore, it will show how to build an extensible Silverlight shader application.

Demo Application

The demo application makes it possible to apply different shaders to an image or to the live stream from the webcam. The application not only comes with the two shaders that will be implemented in this article, it also contains three other shaders I’ve written before. The complete source code is licensed under the Ms-PL and can be downloaded from the CodePlex site.

You need at least the Silverlight 4 runtime installed to run the sample and a webcam is needed in order to exploit the full functionality. The runtime is available for Windows and Mac

Read more : here

Push and pull - Silverlight Webcam Capturing Details

It's not a secret that one of my favorite Silverlight 4 features is the webcam support and I already played endless hours with it. There are many blog posts out there demonstrating how to use the webcam and how to take a screenshot with the CaptureImageAsync method. Only a few cover the VideoSink.

This blog post will show how to use the webcam, the CaptureImageAsync method and also how to implement and use the VideoSink. But most important I'll cover what the differences between the CaptureImageAsync and VideoSink are and when to use which.

Silverlight Webcam 101
 
The Silverlight 4 webcam API is pretty easy to use and just a few lines of code are needed to show a webcam video stream on screen.

Silverlight's CaptureSource class provides the webcam stream that is used as the source of a VideoBrush, which in turn fills a Rectangle with the video feed from the webcam. It's also possible to use any other Shape with a Fill property.

The CaptureDeviceConfiguration class can be used to retrieve a list of all installed video and audio devices on the system. Most of the time it's sufficient to use the GetDefaultVideoCaptureDevice to get the default device. The user can specify the default video and audio devices with the Silverlight configuration; he or she only has to press the right mouse button over the Silverlight application, click "Silverlight" in the context menu and select the "Webcam / Mic" tab to set them.

Read Full Article : here

Microsoft Translator client library for Silverlight

The API is fairly simple and maps to some of the functions of the Translator HTTP-based API.  The following methods are implemented:
  • Detect
  • GetLanguagesForSpeak
  • GetLanguagesForTranslate
  • Speak
  • Translate
You’ll notice that not all the API endpoints are implemented.  Honestly I picked what I was using myself but also what I think would be most useful to application developers. 
Because this is a service, the wrapper implements the above functions as asynchronous methods, so you will see:
  • DetectAsync
  • GetLanguagesForSpeakAsync
  • GetLanguagesForTranslateAsync
  • SpeakAsync
  • TranslateAsync 

Read more : here

Monday, June 14, 2010

Transparent Data Encryption (TDE) in SQL Server 2008

Introduction

As part of the SOX (Sarbanes-Oxley Act) regulatory compliance implementation, one of my banking customers asked me to encrypt their database for an already existing application. It was a business critical web application developed using Visual Studio 2005 (ASP.NET 2.0 framework) and SQL Server 2000 as the backend database. Like any other standard software development project, the delivery schedule for this was also very tight and the client requested that I implement database encryption as quickly as possible, with minimal impact on the existing application. I completed that assignment on time and within budget using Transparent Data Encryption (TDE), a new full database encryption technique introduced in SQL Server 2008. In this article, I will demonstrate the implementation of TDE.

Why Transparent Data Encryption (TDE)

I had to spend 1/3 of the entire project time in feasibility study and chose the best technique for encrypting the existing database from the available options.

SQL server 2000 doesn't provide advance encryption features. Developers need to write extended stored procedures to implement encryption but for this project that was not feasible as modification of all the existing stored procedures would have taken much more time than the client's specified timeframe. There are few third party tools available in the market like DbEncrypt. Using these tools developers can implement encryption for SQL server 2000 databases, but my client didn't agree to spending the extra money for a DbEncrypt license.

My customer was already using SQL server 2005, so I planned to migrate the already existing SQL Server 2000 database to SQL Server 2005 and implement encryption on top of new 2005 databases. However, to implement data or cell level encryption in Microsoft SQL Server 2005, all table column data type must be varbinary, which means I needed to change all existing table structures and modify column data types to varbinary. In addition, there are few drawbacks of SQL Server 2005 data encryption:

  • Ranged and equality searches are not supported in SQL Server 2005 on the encrypted data values.
  • ASP.NET web application performance will be very slow while querying encrypted data because data will be decrypted before sending to front end. Also creating index or using foreign keys often do not work properly with cell-level or column-level encryption.
  • Data backup taken using SQL Server 2005 "Backup" command will not have encryption. Backup data will be in readable format. That means a high data security violation.

Finally, I completed the assignment by implementing TDE. Full database level encryption is first introduced in SQL Server 2008 using TDE. TDE is the best choice for bulk encryption and as a part of the regulatory compliance implementation. Microsoft has designed TDE to provide protection for the entire database without affecting existing applications. After TDE implementation, any backup taken in tape will be as secure as the source database. Without an access key, tape data can't be used. I convinced my customer to migrate the existing SQL Server 2000 database to SQL Server 2008 and implement TDE on top of new SQL Server 2008.

Read Full Article -> here

Hope this helps !!!

Top 13 SQL Server Mistakes and Missteps – #10 Default Database Autogrowth Settings

By default, new databases are created with the following basic file settings:
  • Data File: 2 MB 1 MB unrestricted growth
  • Log File 1Mb 10% unrestricted growth
Just exactly why is this bad?
  1. It will assuredly increase the frequency at which files will grow automatically… A transaction log file, if configured for autogrowth, will expand when it does not have enough free space to record a transaction. This could be due to a large transaction or cumulative transactions where the log is not truncated due to a combination of the recovery model and transaction log backup schedule.
  2. It holds up transaction processing… While the log file is expanded, the transaction that is causing the growth to occur is in a wait state, as is any other transaction that would need to write to the transaction log. This will increase the time required to process and commit the transaction(s) and may result in a timeout to the end user depending upon the connection settings for any affected requests.
  3. It causes external file fragmentation… Repeated file growth (automatic or manual) can result in external file fragmentation which in-turn affects performance negatively. SQL Server loves sequential reads and writes. A fragmented log file can result in an increase in non-sequential writes; a fragmented data file or index file will result in more non-sequential reads. This is because as SQL Server is required to increase the file size, it does so scattered on the disk as space allows. A logical file with bits all over the disk.
  4. Instant File Initialization is only applicable to Data Files… Instant file initialization exists in SQL Server 2005 and newer. This alleviates the issue with a file being inaccessible while it is being expanded. However, this only applies to data files – log files are not affected by instant initialization.

Read Full Article - > here

Hope this helps !!!