Monthly Archives: March 2010

Oracle will boost MySQL, release Cloud Office suite

Oracle Corp. promised to aggressively push its newly acquired MySQL open-source database, rather than kill it.

Oracle also plans to continued to invest in and maintain the independence of OpenOffice.org, the longtime Microsoft Office challenger from Sun Microsystems Inc., but it will also launch a separate cloud productivity suite that’s similar to Google Docs.

Many users feared that Oracle would bury MySQL, a lightweight database that’s gaining acceptance in corporate enterprises after starting out as a favorite of Web start-ups, to avoid cannibalizing its flagship Oracle Database.

But Oracle plans to keep MySQL’s sales team independent while improving MySQL’s code, support and compatibility with other Oracle apps. Oracle will oversee MySQL, OpenOffice.org and other open-source apps in Oracle’s Open-Source Software division.

During a webcast briefing, Oracle executives said the company’s acquisition of Sun’s many top-notch technologies will allow the combined company to offer “complete, open, integrated systems.” That vow appears to be a challenge to IBM, which prior to the Oracle-Sun combination, was considered the largest proponent of enterprise use of open-source technologies.

Here’s a look at some of the highlights of today’s presentation:

Java: Oracle plans to “extend and enhance the reach of Java,” according to Thomas Kurian, an executive vice president. This will be achieved by integrating and simplifying the Java platform runtime — specifically, delivering Version 7 of the Java Standard Edition client for desktop PCs with a variety of improvements, while making the mobile version, Java ME, compatible with the desktop version to lessen work for programmers.

Oracle also vowed to make it easier for Web developers using JavaScript to work with Java. These moves, he said, will all help revitalize the Java developer community, numbers 10 million.

Finally, The JavaOne show will remain independent, but it will now take place during the Oracle OpenWorld conference, which is scheduled to be held in San Francisco in September.

OpenOffice.org: OpenOffice.org will be managed as an independent business unit, with Sun’s development and support teams retained. Oracle will continue to support the free community edition of OpenOffice.org. However, Oracle also plans to deliver a cloud offering called Oracle Cloud Office, which had been under development for a while. Oracle did not comment on the fate of StarOffice, the paid, supported version of OpenOffice.org that competes with IBM’s own OpenOffice.org-based Lotus Symphony.

Solaris: Sun open-sourced its longtime server operating system in 2005. A former Sun executive who now serves as executive vice president of hardware engineering at Oracle, said the company plans to increase investment in Solaris so that it, among other things, will be able to scale to run thousands of CPU threads simultaneously and handle multiple terabytes of memory.

Linux: Oracle has thousands of customers for Unbreakable Linux, its supported version of Red Hat Linux, Screven said. Oracle will now invest in both Linux and Solaris.

Advertisements

Summarizing Data in Microsoft SQL Server 2008

The GROUP BY statement to summarize data is almost as old as SQL itself. Microsoft introduced additional constructs of ROLLUP and CUBE to add power to the GROUP BY clause in SQL Server 6.5 itself. What I have found during my experiences while training SQL Server professionals is that awareness about ROLLUP and CUBE is low and consequently professionals spend a lot of time building queries that could have been easily accomplished by using these constructs. I would attempt to explain the two constructs in this article. I would also attempt to explain a new construct introduced in SQL Server 2008, the GROUPING SETS operator. For the purpose of examples I have downloaded the AdventureWorks sample database from the link provided in the box.

A Simple GROUP BY Clause
Let us say you want to analyze the sales AdventureWorks is doing customer wise and product wise. You could write a query like this.

SELECT CustomerID, ProductID, SUM(LineTotal) AS LineTotal
FROM Sales.SalesOrderHeader INNER JOIN Sales.SalesOrderDetail
ON Sales.SalesOrderHeader.SalesOrderID = Sales.SalesOrderDetail.SalesOrderID
GROUP BY CustomerID, ProductID
ORDER BY CustomerID, ProductID

In the sample output of the Group By Clause query, you see the sum on a per-customer and per-product basis but you do not see what the sum of the line total is for one customer across all products. For that you need to use the ROLLUP operator.
Sample output of the Group By Clause query. Here, you see the sum on a per-customer basis on the left and per-product basis on the right.

The ROLLUP operator
The query for the ROLLUP operator can be written as follows:

SELECT CustomerID, ProductID, SUM(LineTotal) AS LineTotal
FROM Sales.SalesOrderHeader INNER JOIN Sales.SalesOrderDetail
ON Sales.SalesOrderHeader.SalesOrderID = Sales.SalesOrderDetail.SalesOrderID
GROUP BY CustomerID, ProductID WITH ROLLUP
ORDER BY CustomerID, ProductID
The output of the query using the CUBE operator. If you compare the statistics on the right hand side of the yellow status bar at the bottom of each screenshot, you will find that the number of rows and the time taken to run the query has been increasing to keep pace with the complexity of the query.

In the screenshot on the left, you can see the output. The first row in the screenshot shows you the sum across all products and customers. The second row is for one particular customer across all products. You will see for the other customers when you scroll down.What do you do if in the same output you want the sum for one product across all customers? You use the CUBE operator.
The output using the Grouping Sets operator. Observe the missing rows here compared to the CUBE operator.

The CUBE Operator
A sample query written for the CUBE operator.

SELECT CustomerID, ProductID, SUM(LineTotal) AS LineTotal
FROM Sales.SalesOrderHeader INNER JOIN Sales.SalesOrderDetail
ON Sales.SalesOrderHeader.SalesOrderID = Sales.SalesOrderDetail.SalesOrderID
GROUP BY CustomerID, ProductID WITH CUBE
ORDER BY CustomerID, ProductID

The screenshot on top right shows the output of the query using the CUBE operator. If you compare the statistics on the right hand side of the yellow status bar at the bottom of each screenshot, note that the number of rows and the time taken to run the query has been increasing to keep pace with the complexity of the query.

I have been summarizing data all along on two dimensions � customer and product. If you take more than two dimensions, for example, customer, product and the sales person, the number of rows in the result of CUBE will start growing exponentially because the possible number of combinations will start growing exponentially.

The GROUPING SETS Operator
Examine the output of the CUBE operator. What if you want the sum only customer-wise and only product-wise and you are not interested in the breakup customer-product-wise? You use the GROUPING SETS operator.

Here is the query:

SELECT CustomerID, ProductID, SUM(LineTotal) AS LineTotal
FROM Sales.SalesOrderHeader INNER JOIN Sales.SalesOrderDetail
ON Sales.SalesOrderHeader.SalesOrderID = Sales.SalesOrderDetail.SalesOrderID
GROUP BY GROUPING SETS(CustomerID, ProductID)
ORDER BY CustomerID, ProductID

Summary
Presenting summary information to the level of detail desired is one of the important challenges when the consumer of data is the business decision maker. Not all of us today have the luxury of using decision support systems. In this article, I have tried to introduce an easy to build query, summarizing features into your day-to-day data driven applications.

Flex Apps in Visual Studio

We all know about ever increasing richness of browser based applications and great solutions built around them. Now even business solutions are being built using technologies like Microsoft’s Silverlight, Adobe’s AIR etc that enable building RIA’s or rich Internet applications. Most developers have built Silverlight apps using VS but here we explore how VS can be used to build Flash based internet applications. Before showing how this is done let’s begin with a small introduction of Flex framework. We all know that plug-in based technologies like Flash player and Silverlight have enhanced capabilities of browsers manifold, and using these technologies developers can create applications that enable media playback within the browser, plus enable fast execution of code. Adobe Flex is a free and open source framework for building Flash based web applications. Besides using Visual studio plug-in as explained in this article, one can also use Adobe Flex Builder for fast development of Flex applications. The two core components of any Flex application include MXML, an XML mark-up language for declarative UI layout and ActionScript, a fully object oriented language, used for handling interactivity, events, data management and other client-side business logic. Flex also provides a comprehensive library of components and classes that can be used to accelerate development of web applications. This includes visual controls, containers, navigators and charting components, as well as providing support for component skinning, rich media streaming, data binding and interaction with RPC and messaging services.

How it works

To start developing Flex apps in Visual Studio 2008 one needs to download ‘Ensemble Tofino’ plug-in from tinyurl.com/yb8y5ow. Installing downloaded ‘EnsembleTofinoWithFlexSDK.1.2009.09.08.exe’ file results in creation of new project type in Visual studio. To build Flex applications, start Visual Studio and click on ‘File>New>Project.’ From project type select ‘Flex’ and then select ‘Flex Project’ from template and name your application (‘FlexusingVS’). One important point to note here is after you have built your application, debugging would only be possible if you have the debug version of Flash Player installed on your machine. Different debug versions of Flash Player can be downloaded from tinyurl.com/r59ere; in this implementation we used Flash Player 9 (debug version for Internet Explorer). If you already have Flash player installed on your browser, then you might not be able to install the older version unless you uninstall the previous version of Flash Player. Simply go to tinyurl.com/c3e657, download and install uninstaller tool (‘uninstall_flash_player.exe’). Now go to the command prompt and type:

C:\[path] uninstall_flash_player.exe /clean
Once you have installed ‘Ensemble Tofino’ plug-in one can find new project type ‘Flex’ in ‘New Project’ window.

This would uninstall the previous version of Flash Player and let you install a different version. Moving back to application building, you would find different folders of typical Flex application in solutions explorer. The first and most important one is ‘src’ folder. This contains files where actual code is written. Two important files included in this folder are MXML(.mxml) and ActionScript(.as) files. Second folder ‘html template’ contains template for the html wrapper. The Flex application, when deployed onto the web, is wrapped up inside an html page that takes care of detecting whether or not the user has the correct version of the Flash Player installed and, if required, can prompt the user to update their Flash Player. Here is a simple Flex application that displays a message on a button click event, MXML is an XML based language, and as such uses namespaces, the most important one � mx � is bound via the xmlns URI in the application tag and refers to the Flex framework classes:

The important tag worth mentioning here is ‘…../’. This is the defining container for the whole application. One can also customize the look of the application by adding style sheet. Just add a new file (.css) to ‘src’ folder and add these lines:
Building Flex Apps using VS is quite simple, one can see different components of the Flex project in Solutions Explorer; one also gets benefit of intelliSence.

/* CSS file */
Application
{
background-color:Olive;

}

Now add the following tag to ‘FlexusingVS.mxml’ file:

Here is the output of a sample Flex application. To view the output one needs to have Flash Player plug-in installed in browser.

It is evident from the above sample that using VS IDE for building Flex apps is one of the most efficient ways of doing the task, specially for those web developers who are already using VS and are not comfortable with any other IDE.

Integrate YouTube with your phpBB Forum

With Youtube gaining popularity, more and more phpBB boards want to allow their members to post YouTube videos in their posts. I am sure most of you reading this watch Youtube videos and share them. Here we guide you on how to add YouTube videos to your phpBB forums.While phpBB has some of the most popular BBCodes included by default, you can also add your own . This article will explain how to add your own custom BBCodes. PhpBB3 has a powerful new feature that lets you add your own BBCodes directly from an easy to use admin panel interface –no MODS or code changes needed.

To do this, login to Administrative Control Panel (ACP) and click on the ‘Posting’ tab at the top. Click on the ‘Add a New BBCode’ button in the bottom right of the page. This will open up three text input areas, BBCode usage, HTML replacement, and Help line text box -where you can enter a tip on how to use your new BBCode.

Enter the following in the ‘BBCode usage’ box:

[YouTube]http://www.YouTube.com/watch?v={TEXT}[/YouTube]

Enter the following in the ‘HTML replacement’ box:

And finally enter the following in the ‘Help line text’ box:

[YouTube]http://www.YouTube.com/watch?v=SZqwvjwqwK4&feature=fvw [/YouTube]

Now, to use the new [YouTube][/YouTube] BBcode tags you just created on posting page, you need to insert the YouTube Video ID of the YouTube video you want to add in between the tags. You will now be able to embed YouTube videos on your forum.

Google opens Google Apps Marketplace

Google launched on Tuesday evening Google Apps Marketplace, providing a venue for third-party, cloud-based applications to supplement Google’s own online applications.

The program enables integrations with such applications as Google Gmail, Documents, Sites and Calendar. All told, the effort begins with 50 vendors participating, including Atlassian, NetSuite, Skytap and Zoho.

Google announces a business-to-business marketplace for Google Apps users, where the idea is that we want to help users get more applications for Google Apps from third-party developers. Among the applications is a small business payroll system from Intuit, called Intuit Online Payroll, and Box.net’s self-named content management system.

Users can link to an application via the UI in Google applications, offering benefits like single sign-on and sharing of data between Google Apps and third-party applications. Centralized administration also is featured.

As you purchase applications, they’re automatically integrated into your domain. Applications can be installed within a domain via a four-click process. Google Apps Marketplace could be compared to the Apple App Store for iPhone applications or the Salesforce.com Force.com cloud application platform.

At Box.net, an official cited integration benefits of Google Apps marketplace. Basically, Box.net, is deeply integrated with Google Apps. Users can access Box.net directly from applications such as Gmail. Earlier, they would have to go to Box.net as a separate application. Users can add Google Docs documents to a Box.net workflow and send out email alerts.

Participation in Google Apps Marketplace is open to customers of the Premier, Standard and Education editions of Google Apps. Applications are linked to the marketplace via REST Web services and APIs including OpenID and OAuth.

The marketplace is going to significantly help Google Apps adoption and also help adoption of its partner apps. Google is going to bring 25 million users to these partner companies.

Google began offering online applications five years ago, having reached the 25 million-user mark. More than 2 million businesses use the applications.
Google will pass on 80 percent of revenues from Google Apps Market sales to participating partners and keep the remaining 20 percent.

Some of the other application partners include Aviary, Batchbook, Bookfresh, Expensify, OfficeSync, Shoeboxed.com, and SuccessFactors.