Wednesday, January 7, 2009
Chennai .Net Users group
Chennai .Net Users Group:
http://cnug.co.in
BDOTNET Event In Bangalore (On Microsoft Technologies)
UG Meet on January 10thSession 1 : 4PM- 5PM
Topic : Data Services in ASP.NET 3.5
Chaitra
Session 2: 5PM - 6PM Topic : Biztalk Overview
Kashi
Venue :Microsoft Signature building, Embassy golf links (EGL) campus,Koramangala inner ring road, near domlur flyoverBangalore.
via http://bdotnet.in/
Tuesday, January 6, 2009
The Top 10 Products of the Year
At the end of each year, eWEEK Labs analysts look back on the products they have reviewed and pick the ones that stand out for their innovation and ability to meet the ever-changing—and increasingly challenging—needs of the enterprise. Combined, the products on this year’s list form the foundation of the next-gen enterprise.
Adobe AIR
Going back to the late 1990s, people have been talking about the Web as an operating system. Many believe that it was because of these ideas that Microsoft decided to aggressively go after Netscape.
To help further this vision, many people at this time began working on rich Internet applications, or RIAs. These included everything from Macromedia Flash to Java to Curl to ActiveX to some technologies that no longer exist. These products made it possible to build more interactive and GUI-like interfaces for Web applications, though in most cases the apps stayed tied to the browser.
What have become the next generation of RIAs are Web applications that can run independently of a browser—applications that run like those on a desktop but that still use Web services and interfaces for data and interactivity.
The product that comes closest right now to the true vision of this next-generation Web application is Adobe AIR. Descended from Flash, AIR makes it possible to build powerful and interactive applications that have all of the benefits of both Web and desktop apps (such as offline capabilities, in the latter case).
—Jim Rapoza
Agito RoamAnywhere Solution
With mobile phones becoming the preferred mode of voice communication for many employees, mobile phone costs are skyrocketing for many companies.
FMC (fixed mobile convergence) solutions solve this problem, allowing end users to seamlessly leverage Wi-Fi for voice over IP communications while using their corporate PBX profile on the road.
With its new emphasis on enterprise-grade redundancy and security—as well as integration into Cisco’s Motion to aid in roaming decisions among networks—Agito’s RoamAnywhere Solution builds upon its already outstanding fingerprint location deterministics, line-side PBX integration and solid client-side software. All of this provides an outstanding solution to help extend companies’ existing infrastructure to the mobile work force.
—Andrew Garcia
Cisco Catalyst 4900M
Cisco Systems’ newly minted Catalyst 4900M can help network engineers navigate the transition to 10G by offering a mixture of fixed and swappable, card-based ports.
As servers become more densely consolidated, and as the data sets that back-end applications are called on to process continue to swell, IT organizations must seek out strategies for transitioning their direct-to-server connectivity from 1GB to 10GB Ethernet.
The 4900M is a 2U (3.5-inch) form factor data center switch that's designed to sit atop a rack of servers, aggregate their traffic and uplink to an end-of-row switch such as a Catalyst 6500. The “M” in 4900M stands for modular, with the intention that 1G modules will be replaced with 10G modules as data center server network connections increase in bandwidth.
—Cameron Sturdevant
Click here for eWEEK's picks for the top 10 stories of 2008.
Firefox 3
This year may have been the most exciting ever when it comes to Web browsers. Several significant Web browsers were released—from the latest versions of Opera and Safari to the surprise entry of the intriguing Chrome browser from Google—and even Microsoft made significant strides with the beta release of Internet Explorer 8.
But, with the release of Firefox 3, Mozilla cemented its place at the top of the Web browser pile.
The latest release of Firefox hit all of the standard browser notes, with improved security, usability and customization options. However, some of the biggest improvements were under the covers, especially in offline capabilities and the browser’s ability to integrate with and take advantage of next-generation Web technologies.
These improvements haven’t gone unnoticed, with Firefox recently topping 20 percent in browser market share. Best of all, we now have something much better than a browser war—we have a vibrant and active browser market, with a lot of choices. And given some of the interesting features we expect to see in forthcoming browsers, Firefox will have to work hard to maintain its position in 2009.
—J.R.
iPhone 2.0 + the AppStore
Forget the new 3G-enabled iPhone hardware (hampered by AT&T’s spotty 3G coverage); Apple truly hit the mark with the iPhone 2.0 software that came preloaded on the new devices and was available as a free upgrade for first-generation units.
The new software made the iPhone palatable for enterprise consumption—adding improved Wi-Fi security, a Cisco VPN client and support for Microsoft Exchange e-mail environments—even though the enterprise management tools for the iPhone are still lacking.
However, the most significant improvement came with the introduction of the AppStore, along with the iPhone’s new support for third-party applications. The iPhone suddenly became much more than a phone and music player—it’s now a gaming platform, a productivity tool, a powerful vehicle for search and a general lifestyle enhancer for whatever a given user’s interests may be.
And with an increasing stable of enterprise applications on the way (look out for a Citrix client next year), an industry-leading mobile browser for Web-based solutions and a wide base of adoption, the iPhone is quickly becoming enterprise-capable.
—A.G.
IXIA iSimCity
Network performance test maker IXIA launched its iSimCity lab in Silicon Valley in February. In Phase 1, iSimCity focused on classic switch and router testing. In subsequent phases, iSimCity is expected to host data center performance benchmarks, including VOIP gateways, video servers, firewalls and e-mail.
The test center is expected to host city-scale demonstrations of high-performance triple-play testing. Using 1G and 10G hardware, engineers will use IxLoad software to measure application performance.
During the times that I’ve used the center, it’s been minimally provisioned, as IXIA kept only the equipment needed for specific tests on hand. When iSimCity is fully outfitted, it will house all the IXIA chassis, applications, interfaces, infrastructure components and professional expertise needed to run city-scale service emulations.
—C.S.
Nokia E71
Nokia really knocked it out of the park with the E71, packing just about everything a user—or a third-party mobile software developer—could want from a smartphone. Despite its relatively small screen and lack of a touch-screen interface, the E71 was the best overall device eWEEK Labs tested this year.
The smartphone offers revamped support for Microsoft Exchange e-mail via the new Mail for Exchange application. However, the E71 also aims to blend in capabilities to solve next-generation problems.
For example, with its dual Home Screen modes, users can switch the customizations of the device to fit both their personal and work needs. In addition, because the E71 offers the right mix of Wi-Fi performance, codecs, sound performance and open APIs, the device has become the de facto standard for FMC vendors.
—A.G.
Ubuntu 8.04
The dizzyingly diverse world of Linux-based operating systems is, for the most part, divided into two separate camps: those of conservative, stable and pay-per-machine "enterprise" distributions, and those of up-to-date, short-lived, free-of-charge "enthusiast" options.
Ubuntu 8.04—specifically in its desktop iteration—has earned a spot on our list of top products of 2008 by bridging the enterprise-vs.-enthusiast divide with a freely available Linux-based OS and a support term of three years, compared with about 18 months for Red Hat's and Novell's enthusiast distributions.
While "free" is an attractive quality in its own right, what's most appealing about Ubuntu is the broad and active community that has rallied around Ubuntu and its unified enterprise/enthusiast release structure. Ubuntu 8.04 features most of the same software components as other distributions, but Ubuntu's popularity results in more ready-to-install software packages, more troubleshooting answers out on the Web and, increasingly, more OEM preload availability than other desktop Linux options.
—Jason Brooks
VMware VI3
VMware’s Virtual Infrastructure 3 offers enterprises an impressive, mature framework for making virtualization promises a reality.
The foundation of VI3 is VMware’s ESX Server. The platform supports a wide variety of guest OSes, including Windows, Solaris and Linux. The suite uses VMware’s VirtualCenter management server to control systems. Companies looking to consolidate single-application servers, squeeze more out of underutilized hardware, extend the availability of their networked services and get a surer handle on the machines in their data centers would do well to evaluate VI3, which can deliver compelling results in any of these scenarios.
VMware’s product line is the clear leader among x86- and x86-64-based server virtualization products, and VI3 is the firm’s flagship product. I do recommend keeping an eye on the emerging Xen-based offerings from Virtual Iron and XenSource, as well as on the Xen-based functionality that’s built into Novell’s SUSE Linux Enterprise Server and Red Hat’s Red Hat Enterprise Linux 5.
—C.S.
Windows Server 2008
At a time when Vista missteps had many questioning Microsoft's product development mojo, the release of Windows Server 2008 demonstrated that the company is capable of putting out a lean and well-performing operating system with features in sync with customer needs.
In recognition of the growing importance of "just enough OS" system configurations, such as in virtual machine deployments, Windows Server 2008 introduced a stripped-down Server Core configuration for hosting certain Windows Server roles.
What's more, Windows Server 2008 featured a much more modular and securable Web server in IIS (Internet Information Services) 7.0, marked the debut of Microsoft's own hypervisor technology in Hyper-V, and introduced a slate of manageability enhancements for both command-line and GUI adherents.—J.B.
Tech that reads your mind
Produced by Shari Finkelstein
" Tech that explores your secrets..................."
How often have you wondered what your spouse is really thinking? Or your boss? Or the guy sitting across from you on the bus? We all take as a given that we'll never really know for sure. The content of our thoughts is our own--private, secret, and unknowable by anyone else. Until now, that is.
As correspondent Lesley Stahl reports, neuroscience research into how we think and what we're thinking is advancing at a stunning rate, making it possible for the first time in human history to peer directly into the brain to read out the physical make-up of our thoughts, some would say to read our minds.
* * * * * * * * * * * * * * * * * * * * * * *
The technology that is transforming what once was science fiction into just plain science is a specialized use of MRI scanning called "functional MRI," fMRI for short. It makes it possible to see what's going on inside the brain while people are thinking.
"You know, every time I walk into that scanner room and I see the person's brain appear on the screen, when I see those patterns, it is just incredible, unthinkable," neuroscientist Marcel Just told Stahl.
He calls it "thought identification."
Whatever you want to call it, what Just and his colleague Tom Mitchell at Carnegie Mellon University have done is combine fMRI's ability to look at the brain in action with computer science's new power to sort through massive amounts of data. The goal: to see if they could identify exactly what happens in the brain when people think specific thoughts.
They did an experiment where they asked subjects to think about 10 objects--5 of them tools like screwdriver and hammer, and 5 of them dwellings, like igloo and castle. They then recorded and analyzed the activity in the subjects' brains for each.
"The computer found the place in the brain where that person was thinking 'screwdriver'?" Stahl asked.
"Screwdriver isn't one place in the brain. It's many places in the brain. When you think of a screwdriver, you think about how you hold it, how you twist it, what it looks like, what you use it for," Just explained.
He told Stahl each of those functions are in different places.
When we think "screwdriver" or "igloo" for example, Just says neurons start firing at varying levels of intensity in different areas throughout the brain. "And we found that we could identify which object they were thinking about from their brain activation patterns," he said.
"We're identifying the thought that's occurring. It's...incredible, just incredible," he added.
I always tell my students that there is no science fiction anymore. All the science fiction I read in high school, we're doing.
--Paul Root Wolpe, director of the Center for Ethics at Emory University
"Are you saying that if you think of a hammer, that your brain is identical to my brain when I think of a hammer?" Stahl asked.
"Not identical. We have idiosyncrasies. Maybe I've had a bad experience with a hammer and you haven't, but it's close enough to identify each other's thoughts. So, you know, that was never known before," Just explained.
60 Minutes asked if his team was up for a challenge: would they take associate producer Meghan Frank, whose brain had never been scanned before, and see if the computer could identify her thoughts? Just and Mitchell agreed to give it a try and see if they could do it in almost real time.
Just said nobody had ever done an instant analysis like this.
Inside the scanner, Meghan was shown a series of ten items and asked to think for a few seconds about each one.
"If it all comes out right, when she's thinking 'hammer,' the computer will know she's thinking 'hammer'?" Stahl asked.
"Right," Mitchell replied.
Within minutes, the computer, unaware of what pictures Meghan had been shown and working only from her brain activity patterns as read out by the scanner, was ready to tell us, in its own voice, what it believed was the first object Meghan had been thinking about.
The computer correctly analyzed the first three words--knife, hammer, and window, and aced the rest as well.
According to Just, this is just the beginning.
"Who knows what you're gonna be able to read," Stahl commented. "A little scary, actually."
"Well, that's our research program for the next five years," Just said. "To see what, you know--we're not satisfied with "hammer."
And neither are neuroscientists 4,000 miles away in Berlin at the Bernstein Center. John Dylan-Haynes is hard at work there using the scanner not just to identify objects people are thinking about, but to read their intentions.
Subjects were asked to make a simple decision--whether to add or subtract two numbers they would be shown later on. Haynes found he could read directly from the activity in a small part of the brain that controls intentions what they had decided to do.
"This is a kind of blown-up version of the brain activity happening here. And you can see that if a person is planning to add or to subtract, the pattern of brain activity is different in these two cases," Haynes explained.
The future of crime-solving?"I always tell my students that there is no science fiction anymore. All the science fiction I read in high school, we're doing," Paul Root Wolpe, director of the Center for Ethics at Emory University in Atlanta, told Stahl.
To Wolpe, the ability to read our thoughts and intentions this way is revolutionary. "Throughout history, we could never actually coerce someone to reveal information. Torture doesn't work that well, persuasion doesn't work that well. The right to keep one's thoughts locked up in their brain is amongst the most fundamental rights of being human."
"You're saying that if someone can read my intentions, we have to talk about who might in the future be able to do that?" Stahl asked.
"Absolutely," he replied. "Whether we're going to let the state do it or whether we're going to let me do it. I have two teenage daughters. I come home one day and my car is dented and both of them say they didn't do it. Am I going to be allowed to drag them off to the local brain imaging lie detection company and get them put in a scanner? We don't know."
There will be a Supreme Court case about this.
--Paul Root Wolpe
But before we've even started the debate, there are two companies already offering lie detection services using brain scans, one with the catchy name "No Lie MRI." But our experts cautioned that the technique is still unproven.
In the meantime, Haynes is working on something he thinks may be even more effective: reading out from your brain exactly where you've been. Haynes showed Stahl an experiment he created out of a video game.
He had Stahl navigate through a series of rooms in different virtual reality houses.
"Now I would put you in a scanner and I would show you some of these scenes that you've seen and some scenes that you haven't seen," he told her.
Stahl recognized the bar. "And right at this moment, we would be able to tell from your brain activity that you've already seen this environment before," Haynes explained.
"And so, this is a potential tool...for the police...in the case of break-ins?" Stahl asked.
"You might be able to tell if someone's been in an al Qaeda training camp before," Haynes replied.
Haynes said while U.S. national security agencies had not been in touch with him, the Germans had.
"So there are people who are considering these kinds of possibilities," Stahl commented.
And some are using them. In India last summer, a woman was convicted of murder after an EEG of her brain allegedly revealed that she was familiar with the circumstances surrounding the poisoning of her ex-fiance.
"Can you through our legal system be forced to take one of these tests?" Stahl asked Paul Root Wolpe.
"It's a great question. And the legal system hasn't decided on this yet," he said.
"But we do have a Fifth Amendment. We don't have to incriminate ourselves," Stahl pointed out.
"Well here's where it gets very interesting, because the Fifth Amendment only prevents the courts from forcing us to testify against ourselves. But you can force me to give DNA or a hair sample or blood even if that would incriminate me. So here's the million dollar question: if you can brain image me and get information directly from my brain, is that testimony? Or is that like DNA, blood, semen, and other things that you could take from me?" Wolpe asked.
"There will be a Supreme Court case about this," he predicted.
For now, it's impossible to force someone to have his or her brain scanned, because the subject has to lie still and cooperate, but that could change.
"There are some other technologies that are being developed that may be able to be used covertly and even remotely. So, for example, they're trying to develop now a beam of light that would be projected onto your forehead. It would go a couple of millimeters into your frontal cortex, and then receptors would get the reflection of that light. And there's some studies that suggest that we could use that as a lie detection device," Wolpe said.
He said we wouldn't know if our brains were being scanned. "If you were sitting there in the airport and being questioned, they could beam that on your forehead without your knowledge. We can't do that yet, but they're working on it."
Scary as that is, imagine a world where companies could read our minds too.
Light beams may be a bit far off, but fMRI scanning is already being used to try to figure out what we want to buy and how to sell it to us. It's a new field called "neuromarketing." One of its pioneers is neuroscientist Gemma Calvert, co-founder of a London company called Neurosense.
Asked if she has a lot of clients, Calvert told Stahl, "Yes, such as Unilever, Intel, McDonald's, Proctor & Gamble, MTV or Viacom."
And she says it's a growing field. "What we've seen is a sort of snowballing effect over the last few years. I think there are about 92 neuromarketing agencies worldwide."
Proceed with cautionBut some experts question whether it's ethical to scan the brain for commercial purposes, and say neuromarketers may be promising more than they can really deliver.
"If you image my brain, and you say, 'Ah-ha! Paul craves chocolate chip cookies,' and I say, 'No, I don't,' now are you going to believe the brain over me? You can only do that if you have proven that that part of the brain lighting up means in all cases that that person desires chocolate chip cookies. And what a lot of people are doing is they're just imaging the brain, and then they're declaring what that means, and they're never proving that it actually translates into behavior," Wolpe said.
"You know it's very interesting. When you show someone a brain scan, people just believe it. It just reeks of credibility," Stahl commented.
"Absolutely. Absolutely," John Dylan-Haynes agreed.
"And you telling me, 'That's the area where people add and subtract,' I thought, 'Well, of course. He knows,'" Stahl said.
"But I could have told you anything," he pointed out.
So as brain imaging continues to advance and find its way into the courts, the market, and who knows what other aspects of our lives, one message is: be cautious. Another is to get ready. Back at Carnegie Mellon, Just and Mitchell have already uncovered the signatures in our brains for kindness, hypocrisy, and love.
"It's breathtaking," Stahl said. "And kind of eerie."
"Well, you know, I think the reason people have that reaction is because it reveals the essence of what it means to be a person. All of those kinds of things that define us as human beings are brain patterns," Just replied.
"We don't wanna know that...it all boils down to, I don't know, molecules and things like that," Stahl said.
"But we are, you know, we are biological creatures. You know, our limbs we accept are, you know, muscles and bone. And our brain is a biological thinking machine," he replied.
"Do you think one day, who knows how far into the future, there'll be a machine that'll be able to read very complex thought like 'I hate so-and-so'? Or you know, 'I love the ballet because...'?" Stahl asked.
"Definitely. Definitely," Just said. "And not in 20 years. I think in three, five years."
"In three years?" Stahl asked.
"Well, five," Just replied with a smile
Watch video at http://news.cnet.com/8301-11386_3-10131643-76.html?tag=newsCategoryArea.4
Monday, January 5, 2009
SQL Server Triggers
- Triggers allow us to execute a batch of SQL code when an insert, update or delete command is executed against a specific table
- One of these objects that many developers overlook is the trigger. Triggers are "attached" to a table and allow us to setup our database in such a way that whenever a record is added, updated, or deleted from a table, then SQL server will automatically execute a batch of SQL code after that table modification takes place.
- A trigger is an object contained within an SQL Server database that is used to execute a batch of SQL code whenever a specific event occurs. As the name suggests, a trigger is “fired” whenever an INSERT, UPDATE, or DELETE SQL command is executed against a specific table.
- Sample Syntax for Trigger:
- CREATE TRIGGER tr_Source_INSERT ON Source FOR INSERT AS PRINT GETDATE()
Types of Triggers :
There are some added types in SQL Server 2005 for triggering actions:
1) DML Trigger:
1) AFTER Triggers:
- An AFTER trigger is executed only after the triggering SQL statement, including all referential cascade actions and constraint checks associated with the object updated or deleted, is executed successfully.
- The AFTER trigger operation checks for the effects of the triggering statement as well as all referential cascade UPDATE and DELETE actions caused by the triggering statement.
- AFTER is the default, if only the FOR keyword is specified.
- AFTER triggers may be defined only on tables.
- Sample Example:
CREATE TRIGGER job_delete ON jobs FOR DELETE AS
DECLARE @job_id INT
SELECT @job_id = (SELECT job_id FROM DELETED)
IF EXISTS (SELECT job_id FROM employees WHERE job_id = @job_id)
BEGIN
RAISERROR ('you cannot delete a job that is held by an employee', 16, 1)
ROLLBACK TRAN
END
2)INSTEAD OF Triggers:An INSTEAD OF Trigger is used to perform an action instead of the one that caused the trigger to be fired. This sounds like double-talk, so I will explain a little more. Let's say you have an INSTEAD OF INSERT trigger defined on a table and an INSERT is executed. A row is not added to the table, but the code in the trigger is fired. The following shows what this looks like.
CREATE TRIGGER tr_Orders_INSERT_InsteadOf
ON Orders
INSTEAD OF INSERT
AS
PRINT 'Updateable Views are Messy'
Go
2)DDL Triggers:
- DDL triggers, like regular triggers, fire stored procedures in response to an event. However, unlike DML triggers, they do not fire in response to UPDATE, INSERT, or DELETE statements on a table or view. Instead, they fire in response to a variety of Data Definition Language (DDL) events.
- These events primarily correspond to Transact-SQL statements that start with the keywords CREATE, ALTER, and DROP. Certain system stored procedures that perform DDL-like operations can also fire DDL triggers.
- DDL triggers can be used for administrative tasks such as auditing and regulating database operations.
- Use DDL triggers when you want to do the following:
- You want to prevent certain changes to your database schema.
- You want something to occur in the database in response to a change in your database schema.
- You want to record changes or events in the database schema.
- DDL triggers fire only after the DDL statements that trigger them are run. DDL triggers cannot be used as INSTEAD OF triggers.
- The following example shows how a DDL trigger can be used to prevent any table in a database from being modified or dropped.
- Example:
CREATE TRIGGER safety ON DATABASE FOR DROP_TABLE, ALTER_TABLE AS PRINT 'You must disable Trigger "safety" to drop or alter tables!' ROLLBACK ;
- DDL triggers can fire in response to a Transact-SQL event that is processed in the current database or on the current server.
- The scope of the trigger depends on the event.
- To obtain a DDL trigger example that is available in the AdventureWorks sample database, in Object Explorer in the SQL Server Management Studio, open the Database Triggers folder located in the Programmability folder of the AdventureWorks database. Right-click ddlDatabaseTriggerLog and select Script Database Trigger as. By default, the DDL trigger ddlDatabaseTriggerLog is disabled.
- Scenarios for Using a DDL Trigger:
- You can prevent or log changes to your database. As a DBA or database developer, it may be important to know if and when something in your database has changed. In some cases, you may even want to prevent changes by any user altogether.
- You may have naming conventions in your database. DDL triggers can enforce them by preventing improperly named tables, views, stored procedures, and even table columns.
- You may want to perform other actions in response to a DDL event. You could, for example, create a record in the server's event log or execute CLR code you've installed on your SQL Server
3) CLR Triggers:
Sunday, January 4, 2009
SQL Server Indexes
- What indexes do and why they are important. The primary reason indexes are built is to provide faster data access to the specific data your query is trying to retrieve. This could be either a clustered or non-clustered index. Without having an index SQL Server would need to read through all of the data in order to find the rows that satisfy the query
- An index is made up of a set of pages (index nodes) that are organized in a B-tree structure. This structure is hierarchical in nature, with the root node at the top of the hierarchy and the leaf nodes at the bottom, as shown in Figure

When a query is issued against an indexed column, the query engine starts at the root node and navigates down through the intermediate nodes, with each layer of the intermediate level more granular than the one above. The query engine continues down through the index nodes until it reaches the leaf node. For example, if you’re searching for the value 113 in an indexed column, the query engine would first look in the root level to determine which page to reference in the top intermediate level. In this example, the first page points the values 1-100, and the second page, the values 101-200, so the query engine would go to the second page on that level. The query engine would then determine that it must go to the third page at the next intermediate level. From there, the query engine would navigate to the leaf node for value 113. The leaf node will contain either the entire row of data or a pointer to that row, depending on whether the index is clustered or nonclustered
Types of Indexes:
- Clustered Indexes:
A clustered index stores the actual data rows at the leaf level of the index. Returning to the example above, that would mean that the entire row of data associated with the primary key value of 113 would be stored in that leaf node. - An important characteristic of the clustered index is that the indexed values are sorted in either ascending or descending order. As a result, there can be only one clustered index on a table or view. In addition, data in a table is sorted only if a clustered index has been defined on a table.
- Note: A table that has a clustered index is referred to as a clustered table. A table that has no clustered index is referred to as a heap.
- Nonclustered Indexes
Unlike a clustered indexed, the leaf nodes of a nonclustered index contain only the values from the indexed columns and row locators that point to the actual data rows, rather than contain the data rows themselves. - This means that the query engine must take an additional step in order to locate the actual data.
- A row locator’s structure depends on whether it points to a clustered table or to a heap. If referencing a clustered table, the row locator points to the clustered index, using the value from the clustered index to navigate to the correct data row. If referencing a heap, the row locator points to the actual data row.
- Nonclustered indexes cannot be sorted like clustered indexes; however, you can create more than one nonclustered index per table or view. SQL Server 2005 supports up to 249 nonclustered indexes, and SQL Server 2008 support up to 999. This certainly doesn’t mean you should create that many indexes. Indexes can both help and hinder performance
- In addition to being able to create multiple nonclustered indexes on a table or view, you can also add included columns to your index. This means that you can store at the leaf level not only the values from the indexed column, but also the values from non-indexed columns. This strategy allows you to get around some of the limitations on indexes. For example, you can include non-indexed columns in order to exceed the size limit of indexed columns .
Sub Types in Indexes:
- In addition to an index being clustered or nonclustered, it can be configured in other ways:
A unique index is automatically created when you define a primary key or unique constraint:
Primary key: When you define a primary key constraint on one or more columns, SQL Server automatically creates a unique, clustered index if a clustered index does not already exist on the table or view. However, you can override the default behavior and define a unique, nonclustered index on the primary key. - Unique: When you define a unique constraint, SQL Server automatically creates a unique, nonclustered index. You can specify that a unique clustered index be created if a clustered index does not already exist on the table.
- Covering index: A type of index that includes all the columns that are needed to process a particular query. For example, your query might retrieve the FirstName and LastName columns from a table, based on a value in the ContactID column. You can create a covering index that includes all three columns
Index Best Practices:
When in comes to best practices, in some respects I consider them a set of ground rules that should be used as a means to start the design and development process as opposed to an absolute set of rules that are always correct. With that being said, let's outline some points of reference to use as a starting point to address your indexing needs:
- For tables that are heavily updated, use as few columns as possible in the index, and don’t over-index the tables.
- If a table contains a lot of data but data modifications are low, use as many indexes as necessary to improve query performance. However, use indexes judiciously on small tables because the query engine might take longer to navigate the index than to perform a table scan.
- For clustered indexes, try to keep the length of the indexed columns as short as possible. Ideally, try to implement your clustered indexes on unique columns that do not permit null values. This is why the primary key is often used for the table’s clustered index, although query considerations should also be taken into account when determining which columns should participate in the clustered index.
- The uniqueness of values in a column affects index performance. In general, the more duplicate values you have in a column, the more poorly the index performs. On the other hand, the more unique each value, the better the performance. When possible, implement unique indexes.
- For composite indexes, take into consideration the order of the columns in the index definition. Columns that will be used in comparison expressions in the WHERE clause (such as WHERE FirstName = 'Raju') should be listed first. Subsequent columns should be listed based on the uniqueness of their values, with the most unique listed first.
Disadvantages of indexes:
- Occupies high Disk space
- Slower when performing insert, update, delete operations