Google Chrome OS

  • 1

Google Chrome OS

Google is launching Chrome OS. Google is saying that the modern computerChrome-logo user spends so much time working with Web-based resources that the main control system for the computer should be the browser, not the operating system. Furthermore, Google declared that the Chrome OS experience will bear little resemblance to existing way that users interact with their computer’s main control program. It is expected that in Chrome OS world there would be no Win/Web every thing looks to be managed using the web browser.

Security of computer system could be an issue as everything would be maintained using web browsers.

Another important noticeable thing is Google can give Google Docs to users to store their important documents in their computer harddrive than storing on Google Docs online. Google allows to store meta information with the document which actually makes the searching very fast with in the system.

Microsoft uses indexing service to automatically index all the documents & folders created within the computer system. would that be gone in Google Chrome?

Google may also take a cue from its own e-mail application, GMail, which blends the traditional idea of having folders for e-mail with the concept of “labels.” In GMail, you can drag messages into folders to file them, or you can drag folders (or labels) over messages to categorize them. It’s the same thing, but the hierarchy people are used to in operating systems, where a file is in one folder at a time, and the folder may be nested in another folder, is simply not there. Folders and labels are interchangable and far more fluid.

It is also expected that the Chrome OS will be using the interface of Chrome browser–like a tabbed view for switching between “apps,” and the mind-reading command line (address bar in the browser). It may also evidence Google’s traditional obsession with clean (if not necessarily attractive) design and speed. The Chrome OS should be fast.

  • 28

Tips for Creating a better E-Commerce Application

E-Commerce, A name started few years back and now ruling the world. Most of the companies started their E-Commerce portals to sell products online to increase their sales and some are even only online portals they don’t have off line stores and they sell some one else’s products.

Now a days people want the products at their door steps. If your services are on time then no one can beat you in E-Commerce, Following are few of recommendations to develop an E-Commerce Application:

1. A neat and clean website design

Your website UI design must be very clear and soothing that users visit again and again, atleast to review the design.

2. Avoid Ads:

if you want to show some Ads go for internal Ads, Like Ad of one of your product which is going to appear on other page

3. Easy to find Products:

Put a Search box, so that users can easily find the products on website, People don’t remember SKUs so make the search keyword enabled, better to go for Full Text Search.

4.  Better Searched Results Page:

The search results page should be interactive enough to display the maximum products and at the same time the page should not be cluttered enough that irritates the customer to find the required product.

5. Put Drill Down on Searched Results:

The successful websites like Amazon, E-Bay, CNET etc have the Drill Downs impemented on the searched results. Suppose user entered the keyword “Laptop” in the search box, Now it will display the list of all the laptops in the searched results but the true E-Commerce leader will display the searched results as the Groups of Laptops. Grouping by Brand, Grouping By common paratmeters like screen size, RAM, Processor, Next Generation Processors, Price Slabs (500$ – 800$, 1000$ to 1200$) etc so that user’s can easily idetify the product that they required.

6. Product Details Page:

Your  product details page is very important for the user, as its going to behave like a Sales Man, Display the product with Multiple pictures, one picture on the screen of medium size and show some icons of the images below the main image and let the user to view the bigger images. Give all the four views of a product to user for his satisfaction.

Dont write very long descriptions, describe important points and give a summary too.

7. Product Variants:

Display variants of products on Product Detail Pages. When you enter a shop and check a laptop the sales person will also show you the different models of that laptop or different skins available for that so that you can have options to buy. similarily this page is your sales man.

8. Shopping Cart:

Make an interactive shopping cart, easy to operate where the quantity of the prodcuts can be altered.

9. Easy Checkout:

There should be an easy checkout system, Users should be able to enter multiple Shipping addresses while let them have only one billing address and store those shipping and billing addreses for future usage.

10. Payment Gateway Integration:

Always go for Secured and known payment Gateways like paypal, google that people can trust over.

11. Use SSL certificate to make the pages secured:

Its very necessary for you to implement the SSL certificate to prevent fraud and theft of your important information.  Users will not trust your site untill it has the SSL installed – i mean https://

12. Display Secured Logos:

Display the logo of that SSL provider on your website that let the users know that the site is secured. there are various organizations who keep on testing your websites and make sure that your website is hackers safe and fraudulent free. Like Hackerssafe. keep these logos on your website that will assure users that your site is protected and safe which will eventually increase your site traffic.

13. Let the people sell your Products on their sites:

Pubish the XML / CSV feeds. Let people subscribe to that. In this way, your product selling will increase and your brand will be promoted.

14. Google Page Rank:

Google page rank play an important role in E-Commerce Applications, Now a days users are more smart than the programmers. They know the importance of Google Page Rank and they know if a site has high Page rank (atleast PR-4) that means that site has importance in Google eyes and will be Good. Click here to find steps to increase Google Page Rank

15 Alexa Page Rank:

Alexa page rank defines the usage of the site. It shows the rank of a page as per the visits of  the users. so user can some to know how popular is your site is.

These were few steps to make your e-commerce application as the best E-Commerce application.

We at Zonix develop these E-Commerce Application, if you would like to go for that – contact at or email at Few more things are more which we will be publishing in near future. Keep visiting.

Bigbuyindia is an E-Commerce Portal where you can buy India Jewellery products.

Bookmark and Share

  • 0

Multiple Active Result Sets (MARS – ADO.NET 2.0)

Multiple Active Result Sets (MARS) is a feature in ADO.NET 2.0. It allows execution of multiple batches against Database on a single connection. Preeviously, only one batch could be executed at a time against a single connection. But, execution of multiple batches with MARS does not mean like simultaneous execution of operations.
In previous versions of SQL Server; to access multiple result sets using SqlDataReader objects, a separate SqlConnection object must be used with each SqlCommand object. In ADO.NET 2.0 / SQL Server 2005; MARS feature is disabled by default. It can be enabled by adding the “MultipleActiveResultSets=True” keyword pair to your connection string, as below:

string connectionString = @”Data Source=GTL-263SQLEXPRESS;Initial Catalog=master;Integrated Security=SSPI;MultipleActiveResultSets=True“;


Without MARS, you could only run one batch per connection. some what like below Example:

private void NoMarsImplementation()
SqlConnection conn = new SqlConnection(@”Data Source=GTL-263SQLEXPRESS;
Initial Catalog=master;Integrated Security=SSPI;”);

string sql1 = “SELECT * FROM [Customer].[TBL_Customer]”;
string sql2 = “SELECT * FROM [Supplier].[TBL_Supplier]”;

SqlCommand cmd1 = new SqlCommand(sql1, conn);
SqlCommand cmd2 = new SqlCommand(sql2, conn);
cmd1.CommandTimeout = 500;
cmd2.CommandTimeout = 500;
SqlDataReader dr1 = cmd1.ExecuteReader();
// misc. code with dr1

SqlDataReader dr2 = cmd2.ExecuteReader();
// misc. code with dr2

Above Example shows that you can use the same connection with the second SqlDataReader only when you finished using the connection with first one. The connection must be closed and reopened to use same Connection with Second SqlDataReader. Otherwise you would get this error – “There is already an open DataReader associated with this Command which must be closed first”.

with MARS, it is possible to use a single opened connection for more than one batch. Check out below code:

private void MarsImplementation()
SqlConnection conn = new SqlConnection(@”Data Source=GTL-263SQLEXPRESS;
Initial Catalog=master;Integrated Security=SSPI;MultipleActiveResultSets=true;“);

string sql1 = “SELECT * FROM [Customer].[TBL_Customer]”;
string sql2 = “SELECT * FROM [Supplier].[TBL_Supplier]”;

SqlCommand cmd1 = new SqlCommand(sql1, conn);
SqlCommand cmd2 = new SqlCommand(sql2, conn);
cmd1.CommandTimeout = 500;
cmd2.CommandTimeout = 500;
SqlDataReader dr1 = cmd1.ExecuteReader();
// misc. code with dr1
SqlDataReader dr2 = cmd2.ExecuteReader();
// misc. code with dr2

In this way, using MARS, you can simply execute an SqlDataReader that will open a Read-Only Cursor; use data from that SqlDataReader and perform Insert / Update function against Database. You only need to Open the SqlConnection object once before you execure the SqlDataReader and Close the Connection (without re-openning) at last after performing Insert / Update function.

Here is another Example, in which we retrieve records from Category Table which is having ParentCategoryID as 0 thru SqlDataReader and Update the Product Table records which is having CategoryID from SqlDataReader.

private void MarsImplementation()
//connection string
string connectionString = @”Data Source=GTL-263SQLEXPRESS;Initial Catalog=master;
Integrated Security=SSPI;MultipleActiveResultSets=true;“;

SqlTransaction updateTran = null;
//sqlCommand to open SqlDataReader
SqlCommand catCmd = null;
//sqlCommand to update the Product table
SqlCommand updateCmd = null;

int CategoryID = 0;

//Query to fetch the categories with ParentCategoryID having 0
string catSQL =
“SELECT CategoryID, Name FROM Category ” +
“WHERE ParentCategoryID = 0”;

//update all the product’s quantity which is having CategoryID from above Query
string updateSQL =
“UPDATE Product ” +
“SET Qty = Qty + @OrderQty ” +
“WHERE CategoryID = @CategoryID”;

using (SqlConnection Connection =
new SqlConnection(connectionString))
Connection.Open(); //open the connection once here
updateTran = Connection.BeginTransaction();

catCmd = new SqlCommand(catSQL, Connection);
catCmd.Transaction = updateTran;

updateCmd = new SqlCommand(updateSQL, Connection);
updateCmd.Transaction = updateTran;
updateCmd.Parameters.Add(“@Qty”, SqlDbType.Int);
updateCmd.Parameters.Add(“@ProductID”, SqlDbType.Int);

//execute the sqlDataReader
using (SqlDataReader catReader = catCmd.ExecuteReader())
while (catReader.Read())
CategoryID = (int)catReader[“CategoryID”];

updateCmd.Parameters[“@OrderQty”].Value = 100;
updateCmd.Parameters[“@CategoryID”].Value = CategoryID;
//perform Update against Product table with same connection
//without closing and re-openning it again
//having SqlDataReader already openned


Bookmark and Share

  • 2

How Big is google’s database

Visist : (Our Official Website)

Google search crawler uses 850 TB of information, so that’s the amount of raw data from the web.

Google Analytics uses 220 TB stored in two tables: 200 TB for the raw data and 20 TB for the summaries.

Google Earth uses 70.5 TB: 70 TB for the raw imagery and 500 GB for the index data.

The second table “is relatively small (500 GB), but it must serve tens of thousands of queries per second per datacenter with low latency”.

Personalized Search doesn’t need too much data: only 4 TB.
Personalized Search stores each user’s data in Big table.
Each user has a unique user id and is assigned a row named by that user id.
All user actions are stored in a table.

Google Base uses 2 TB and Orkut only 9 TB of data.
If we take into account that all this information is compressed. For example, the crawled data has compression rate of 11%, so 800 TB become 88 TB, Google uses for all the services mentioned before 220 TB.

It’s also interesting to note that the size of the raw imagery from Google Earth is almost equal to the size of the compressed web pages crawled by Google.

Bookmark and Share

  • 0

The real difference between SQL Server and Oracle

Visit : (our Official website)

For years now there’s been a constant war between Microsoft supporters and Oracle supporters. Oracle has these features, SQL Server has these features, etc. But that’s not really where the real importance lies. Sure, functionality is a part of it because your database should be able to do what you need it to do. However, do you want to know what the real difference between the two companies is and why Microsoft has made such a strong impact in the industry?…. Read More….

Bookmark and Share

  • 1

UPDATE Based Off of A Table

visit : (our official website)

 INSERT offers the ability to insert into a table based upon a SELECT statement with the following syntax:



there are time where you may want to do a similar approach with UPDATE.
Here is the syntax to do that very task:

               [TABLEA].[FIELDB] = [TABLEB].[FIELDB] 
               [TABLEA].[FIELDC] = [TABLEB].[FIELDC] 
        FROM [TABLEA]
               JOIN [TABLEB]
        ON [TABLEA].[KEYA] = [TABLEB].[KEYA]


Bookmark and Share

  • 0

Passing parameters to dynamic query

visit (our official Website)


Consider following queries

1. SELECT * FROM @tablename

2. SELECT @colname FROM tbl

3. SELECT * FROM tbl WHERE x IN (@list)

4. SELECT @Cnt=Count(*) FROM tbl WHERE x IN (@list)


For the first query, it will give error ‘Must declare the table variable “@tablename”‘ if @tablename is not Table variable.

For Second query it will display all rows with same value contained in @colname rows in ‘tbl’.

For Third query it will display correct result if @listonly one value(no comma separated values).

Fourth one is same as third query but it stores value in a variable @Cnt. The actual problem will come to know after solving third one.

To get correct result, we need to create Dynamic query for all four queries.


The first three queries can be execute correctly by using Exec().

EXEC() takes one parameter which is an SQL statement to execute.The parameter can be a concatenation of string variables and string literals, but cannot include calls to functions or other operators.


The first three can be written as:


1. Exec (‘SELECT * FROM’ + @tablename)

2. Exec (‘SELECT ‘ + @colname +‘ FROM tbl’)

3. Exec (‘SELECT * FROM tbl WHERE x IN (‘+@list+‘)’)


But Fourth one can not be written simply using Exec(). Because if @Cnt is declared outside the statement being executed in Exec() like


Declare @Cnt int

Exec(‘SELECT @Cnt = Count(*) FROM tbl WHERE x IN (‘+@list+‘)’)

Select @Cnt


it will give error

Must declare the scalar variable “@Cnt”.


Here is need of sp_executesql instead of Exec().

sp_executesql is a system stored procedure that you can use in place of “exec” to execute your dynamic sql. It takes two pre-defined parameters and any number of user-defined parameters.

This allows you to have parameters in your dynamic query and pass them in. The end result is that SQL Server will try to cache the execution plan for your query giving you some of the advantages of a fully compiled query.

The first parameter @sql is mandatory, and contains a batch of one or more SQL statements. The data type of @sql is ntext in SQL 7 and SQL 2000, and nvarchar(MAX) in SQL 2005. A varchar value won’t do.

The second parameter @params is optional, but you will use it 90% of the time. @params declares the parameters that you refer to in @sql. The syntax of @params is exactly the same as for the parameter list of a stored procedure. The parameters can have default values and they can have the OUTPUT marker.Just like @sql, the data type of @params in SQL 7/2000 is ntext and nvarchar(MAX) in SQL 2005.

The rest of the parameters are simply the parameters that you declared in @params, and you pass them as you pass parameters to a stored procedure, either positional or named. To get a value back from your output parameter, you must specify OUTPUT with the parameter, just like when you call a stored procedure.


Let’s write the fourth query using sp_executesql.

Declare @CntRow int

Declare @sql nvarchar(200)

Declare @params nvarchar(200)

set @sql = ‘SELECT @Cnt=Count(*) FROM tbl WHERE x IN (@list)’

set @params = ‘@list varchar(100),@Cnt int output’

exec sp_executesql @sql,@params,‘1,2,3’,@CntRow output

Select @ CntRow

‘1,2,3’ will be passed to @list and result of @Cnt will be set to @CntRow.

Bookmark and Share

  • 0

To get comma separated list of values of single field in SQL Server

Visit: (our official Website)

A solution to get comma separated list of values of single field of a database table


You can use the following code to get the comma separated list of values of a single field of a table:


DECLARE @commaSeparatedVal AS VARCHAR(4000)

SELECT @commaSeparatedVal = ISNULL(@commaSeparatedVal +‘,’,) + CONVERT(VARCHAR,[SKU]) FROM PRODUCT

PRINT @commaSeparatedVal


Bookmark and Share

  • 2


visit: (our official Website)

DIFFERENCE(string1, string2)

Returns the difference between two strings as a value between 0 and 4. This function uses the SOUNDEX algorithm to compare sounds, rather than characters. If the two strings match phonetically very well, the DIFFERENCE() function will return the value 4. If they don’t resemble each other even remotely, it will return the value 0.

The DIFFERENCE function is commonly used to search with names. Instead of a comparison like:

WHERE Authors.AuthorName = sAuthor

where sAuthor is the name supplied by the user, you can use the following comparison:

WHERE DIFFERENCE(Authors.AuthorName, sAuthor) = 4

The latter comparison will match “Mansfield” with “Mansfeeld”, “Petroutsos” with “Petrutsos”, and so on.


Returns the four-character SOUNDEX code of a word. You can use this value to compare the closeness of two words. The SOUNDEX function converts a string to a four-character code: the first character of the code is the first character of the string argument, and the second through fourth characters of the code are numbers that code the consonants in the word (vowels are ignored unless they are the first letter of the string). The strings “Brannon”, “Branon”, and “Bramon” all have a SOUNDEX value of B655, because the sounds of n and m are very close. The word “Bradon”, however, has a SOUNDEX value of B635 (it differs by a consonant in the middle of the word).The word “Branok” has a SOUNDEX value of B652, since it differs in a consonant at the end.


                                 SOUNDEX (Transact-SQL)





Returns a four-character (SOUNDEX) code to evaluate the similarity of two strings.


Syntax :


SOUNDEX ( character_expression )


Arguments :


character_expression – Is an alphanumeric expression of character data. character_expression can be a constant, variable, or column.


Return Types :



Remarks :

SOUNDEX converts an alphanumeric string to a four-character code to find similar-sounding words or names. The first character of the code is the first character of character_expression and the second through fourth characters of the code are numbers. Vowels in character_expression are ignored unless they are the first letter of the string. String functions can be nested.


Examples :

The following example shows the SOUNDEX function and the related DIFFERENCE function. In the first example, the standard SOUNDEX values are returned for all consonants. Returning the SOUNDEX for Smith and Smythe returns the same SOUNDEX result because all vowels, the letter y, doubled letters, and the letter h, are not included.


-> Using SOUNDEX

SELECT SOUNDEX (‘Smith’), SOUNDEX (‘Smythe’);


Here is the result set.


No column name     No column name

S530                           S530


(1 row(s) affected)


The DIFFERENCE function compares the difference of the SOUNDEX pattern results. The following example shows two strings that differ only in vowels. The difference returned is 4, the lowest possible difference.



SELECT DIFFERENCE(‘Smithers’, ‘Smythers’);


Here is the result set.


No column name



(1 row(s) affected)


In the following example, the strings differ in consonants; therefore, the difference returned is 2, the greater difference.


SELECT DIFFERENCE(‘Anothers’, ‘Brothers’);


Here is the result set.


No column name



(1 row(s) affected)



Bookmark and Share

  • 2

Full Text Search in SQL Server 2005

Visit: (our Official Website)

Definition :

Full text search is the search functionality that enables a fast and easy way of searching text based data in SQL Server.

Why Full Text Search?

Let us assume that we have huge amounts of data in the database and we are having some search functionality involved in User Interface (UI). The UI for the database is a website open to the internet so response time is crucial. Now if the administrator of the website wants to search all the customer names which have a specific pattern, then he or she queries the database system as shown in Listing 1.


Listing 1:

SELECT [NAME] FROM [CUSTOMER] WHERE [NAME] LIKE ‘%PATTERN%’The query in Listing 1 is fine for getting the result. But in real time this may not suffice the actual requirement. Let us see why the query in Listing 1 may not yield us actual results.


1. In case of a large amount of data, the like query works very slowly. It may take minutes to return the result. This is true especially for unstructured text data.


2. If I want to query my data on formatted binary data [format], I cannot use a Like query.


So to summarize, the need to of the hour is for a search functionality that is fast, efficient and can also be run on unstructured text data with the support of search on different data types like formatted binary. Full text search qualifies all these and in fact has many advantages.



Full-Text Indexing Architecture :

You might be a bit surprised to learn that SQL Server doesn’t handle its own full-text indexing tasks. Any version of Windows that SQL Server will run on includes an operating system component named the Microsoft Search Service. This service provides indexing and searching capabilities to a variety of applications, including SQL Server, Exchange, and SharePoint.

SQL Server uses an interface component, the SQL Server Handler, to communicate with the Microsoft Search Service. The Handler extracts data from SQL Server tables that have been enabled for full-text searching and passes it to the search service for indexing. Another component, the full-text OLE DB provider, gets invoked by SQL Server when you actually perform a full-text search. The provider takes the portion of the search that needs to be satisfied by the full-text index and passes it off to the Search Service for evaluation.

You need to be aware of one consequence of this architecture: because the full-text indexes are not in your SQL Server database, they can’t be backed up from within SQL Server. Instead, you need to backup the disk files created by the Search Service. You’ll find these files located under Program FilesMicrosoft SQL ServerMSSQLFTDATA.



Implementing Full Text search :

Let us discuss the steps for implementing full-text search in SQL Server 2005.


-> Adding a full text search catalog to the database – To add a full text search catalog we need to open the database node in Management studio and click on the storage node. We can see the Full text catalog in this node. We have an option for adding the full-text catalog by which we can add a new catalog.


-> Adding the Full text indexing table – We need to specify to the database that we want to implement the full-text search functionality for a table. To do this we can select the respective table and select the right click option of Full-Text Index and Define Full-Text index.


This opens up the Full text indexing wizard.


1. Using the Full text indexing wizard we select a unique index.


2. Once we select a unique index and move to the next step, we select the columns that are eligible for full text queries. This enables the full-text search for the selected columns.


3. We need to select the option of how can we track the changes. If automatically selected then a full population of indexing occurs. To avoid a population at the end of this wizard, select the Do Not Track Changes option, and clear the Start Full Population When Index Is Created checkbox.


4. Once we are done with step 3 we need to map the catalog out of all the catalogs at the database level. Or we could even create a new catalog for the full text search.


5. This is the last step of the wizard. Here we can create a table schedule and catalog schedules and schedule them with time. A table schedule can have a name, time of schedule and occurrences.


Once we create them and click on the finish button the full-text index is created.



Running the Full Text search :

Until now, we have set-up the full text search catalogs and indexes. Let us run the some queries for the full-text search. There are four types of predicates used in SQL Server 2005 for running the Full text search queries. A predicate is an expression that evaluates to TRUE, FALSE or UNKNOWN. A predicate is used in a where condition in T-SQL statement.









Let us see each one of them individually with its usage.



Freetext is the simplest form of predicates in the full text search. It searches for the words that give the similar meaning and not the exact wording of the word. This kind of predicate is used where we go to query a document as a whole for a word in it. The freetext not only returns the exact wording, but also the nearest meanings attached to it. Listing 1 shows the usage of the free text. To understand listing 1, the user should have a basic understanding of T-SQL queries. Let us also see the usage of Freetext with a help of an example. Listing 2 gives an example for the usage of FREETEXT.


Listing 2 :

FREETEXT ( { column_name | (column_list) | * }

, ‘freetext_string’ [ , LANGUAGE language_term ] )


Listing 3 :

SELECT CellularPhone FROM CART WHERE FREETEXT (CellularPhone, ‘1111’)


Listing 4 :





Freetexttable returns a collection of one or more rows as a table. The columns in the rows are selected based on the string given as the predicate. Freetexttable is similar to freetext except the former can return tables and the latter one can return columns. Listing 4 shows the usage of Freetexttable.


Listing 5 :

FREETEXTTABLE (table , { column_name | (column_list) | * }

, ‘freetext_string’

[ ,LANGUAGE language_term ]

[ ,top_n_by_rank ] )



As the name suggests, Contains actually works by verifying if a word or phrase is contained in the columns. It can search for a word, prefix of a word, synonym of a word, word formed from another word. We need to specify the language in case the languages of the words are not of the same language. Listing 5 shows the simple usage of contains column.




Listing 6 :

SELECT [Name], [Address]

FROM Customer


AND CONTAINS([Name], ‘Uday’);



Contains and Containstable are similar to freetext and freetexttable. The former one returns columns and the latter one returns the table.


Conclusion :


Full-text search allows fast and flexible indexing for keyword-based query of text data stored in a Microsoft SQL Server 2005 database.


Bookmark and Share