Database

Understanding Oracle’s OLAP Products

June 6th, 2008

They’ve published a helpful whitepaper titled “Understanding an OLAP Solution from Oracle” which explains the key differences between Hyperion Essbase (which Oracle recently acquired) and Oracle Database OLAP Option.  The decision is broken down into five axes: the Purpose, Buyer, End Users, Front Ends, and Data Management.

Indexing LINQ

May 24th, 2007

Microsofts LINQ presents a wonderful sql-like syntax for querying arbitrary collections of objects. Under the hood, however, that sql-like syntax is transformed into what is called a monoid comprehension, which, scary though it may sound, is basically one or more nested loops.

This nested loopiness means that if you do anything more complex than filtering or mapping on a collection, for example a join, you will rapidly end up in a world of performance pain and your query starts performing O(n^m), where m is the number of nested loops.

Consider the following LINQ query:

var q = from c in customers
join o in orders on c.Key equals o.Key
select new {c.Name, o.OrderNumber};

This code will get translated into something like this:

foreach (var c in customers)
foreach (var o in orders)
if (c.Key == o.Key)
yield return new { c.Name, o.OrderNumber };

For small collections, this approach is fine, but when they start to get larger, the number of times through the loop is going to get out of control.

Relational databases sometimes have to perform the same algorithm, but they also provide the possibility of indexing the collections, which in the case of the example above, would eliminate the necessity of scanning through all the orders checking each to see if its key matches a customer - instead, the index would be used to rapidly identify the small number of matching orders.

You can bet your bottom dollar that Microsoft has something in the works to address this issue - LINQ to objects is basically useless without indexes. In the mean time, however, there is i4o, a project to do exactly that:

Introducing i4o
Codeplex - i4o

New database startup

February 15th, 2007

Mike Stonebraker, original designer of Ingres, and more recently CTO of Streambase, a dynamic query system for realtime data, has a new startup, called Vertica. They claim to address the limitations of traditional RDBMS in the face of the terabyte data explosion, with a database that increases performance by two orders of magnitude. There is an article about it here.

Hibernate Is Not the Only (or the Best) Java Object-Relational Mapper.

November 9th, 2006

Gavin King, the creator of Hibernate, is a brilliant engineer, but he’s an even better marketer. Although Hibernate wasn’t the first open source Java ORM, and it lacked some important features available from its competitors, he somehow managed to convince the rest of the industry to adopt the framework as a standard.

But if you’ve been frustrated with Hibernate’s limitations, and you’d like to take a look at an alternative, check out the Apache Software Foundation’s Cayenne. Not only has Cayenne been around longer than Hibernate, but it offers features that Hibernate doesn’t, such as a graphical modeling tool, and the ability to nest Units of Work.

Cayenne is available from: http://incubator.apache.org/cayenne/

World War III is a Giant Ice Cream Cone

July 4th, 2006

That bit of inspired nonsense by an obscure rock band came to mind when I read Ted Neward’s recent blog post that has had developers on TheServerSide.com and elsewhere buzzing the past few days. The cause of all the attention is immediately obvious just from the title of Ted’s post, in which he describes Object/Relational Mapping as The Vietnam of Computer Science. Having successfully used O/R mapping tools for almost ten years, starting when I was fortunate enough to stumble upon NeXT’s Enterprise Object Framework (now a part of Apple’s WebObjects), followed more recently by open source frameworks such as Hibernate and Cayenne, I had to put my two cents in. Read the rest of this entry »

WMI configuration error

February 16th, 2006

After installing VS.NET 2005, I began receiving the following WMI configuration error when trying to install SQL Server 2000, 2003 or 2005:

The SQL Server System Configuration Checker cannot be executed due to WMI configuration on the machine [machine name]Error:2147749896 (0×80041008).

Following various abortive efforts to fix, I finally came across this batch file that resolved the issue:

@echo on
cd /d c:\temp
if not exist %windir%\system32\wbem goto TryInstall
cd /d %windir%\system32\wbem
net stop winmgmt
winmgmt /kill
if exist Rep_bak rd Rep_bak /s /q
rename Repository Rep_bak
for %%i in (*.dll) do RegSvr32 -s %%i
for %%i in (*.exe) do call :FixSrv %%i
for %%i in (*.mof,*.mfl) do Mofcomp %%i
net start winmgmt
goto End

:FixSrv
if /I (%1) == (wbemcntl.exe) goto SkipSrv
if /I (%1) == (wbemtest.exe) goto SkipSrv
if /I (%1) == (mofcomp.exe) goto SkipSrv
%1 /RegServer

:SkipSrv
goto End

:TryInstall
if not exist wmicore.exe goto End
wmicore /s
net start winmgmt
:End

small loan 26 businessinterest only 5 loan yearhome ability loanmortgage home loan americanhours personal loan 24advances com day pay loansday com pay advances loan21 loans cash daygo 2 loan setloan home 60 year18sex video18th and politics century pornographydigital audio convert 5.1 analog 3phone sex 1-800 chat linessite porn video upload amatueramerican pornstarsbreast milk porn adult nursingamateur engine sex Map

Parameterized Queries and Performance

January 26th, 2006

The following post show you how you can improve your database performance (while caching your query plans) with a tiny change in your execution code.
Parameterized Queries and Performance

To SP or not to SP in SQL Server

October 26th, 2005

An interesting article by Douglas Reilly, To SP or not to SP in SQL Server, covers some interesting aspects while comparing those two approaches in several categories like security (SQL Injections), performance issue (pre-compile SP, does it help?), maintenance and cross platforms.

His final conclusion was “Its depends”.
Read the rest of this entry »

Installing MS SQL Server Express

October 19th, 2005

I have recently attempted to install SQL Server 2005 Express on my machine and got the following error message:

SQL Server 2005 Setup has detected incompatible components from beta versions of Visual Studio, .NET Framework, or SQL Server 2005. Use Add or Remove Programs to remove these components, and then run SQL Server 2005 Setup again. For detailed instructions on uninstalling SQL Server 2005, see the SQL Server 2005 Readme.

At that moment I had Visual Studio 2005 Team Suite Edition Beta 2-English and SQL Server 2005 Developer Edition installed. Uninstalling either did not help. Uninstalling .Net 2.0 Beta framework resulted in SQL Server 2005 Express install complaining about its absence, while reinstalling it brought the original problem back.

I turned to the net and found a large number of similar complaints, but very few solutions, neither of which worked for me.

After many hours of research and tinkering, I have encountered this page. While seemingly unrelated, it contains a link to .Net 2.0 framework version 2.0.50727.26, while the version of framework available from all other places I could find was 2.0.50215.

Uninstalling the older .Net framework and installing this one made the problem go away. I have not seen this solution offered elsewhere and thus thought it deserves mention.

DataSet and DataTable in ADO.NET 2.0

October 14th, 2005

I found this nice summary about some of the changes in datasets/ datatables in .NET 2.0

check it out… DataSet and DataTable

Dynamic Query in Linq

September 26th, 2005

Anyone know how runtime-defined queries are expected to be created using Linq?

Seems to be a big issue that I haven’t seen a decent story for yet.

T-SQL Enhancements in SQL Server 2005

September 20th, 2005

T-SQL Enhancements in SQL Server 2005

Features covered:

1. Statement-level recompile—More efficient recompilation of stored procedures
2. Event notifications—Integration of Data Definition Language (DDL) and DML operations with Service Broker
3. Large data types—New data types that deprecate TEXT and IMAGE
4. DDL triggers—Triggers that fire on DDL operations
5. Common Table Expressions—Declarative syntax that makes a reusable expression part of a query
6. Hierarchical queries—Declarative syntax for tree-based queries
7. PIVOT—Declarative syntax aggregations across columns and converting columns to rows
8. APPLY—New JOIN syntax made for use with user-defined functions and XML
9. TOP—Row count based on an expression
10. Transaction abort—TRY/CATCH syntax for handling errors

Microsoft LINQ Forum

September 19th, 2005

Tons of feedback and interaction regarding LINQ technologies here on Microsoft Technical Forums LINQ Forum

Oracle 8i on Linux

September 16th, 2005

This has been a very popular resource over the years, so I’m reposting a link to it here:

http://www.lab49.com/~vivake/oracle/OracleLinux.html

.NET 3.0 spec released

September 13th, 2005

Microsoft detailed the future direction of C# today with the release of information about its LINQ project and the C# 3.0 draft specification.

LINQ stands for Language INtegrated Query, and is a set of extensions to the C# language which allow SQL-type capabilities to be integrated into the language itself.

In addition, the C# 3.0 spec details a continued development of the C# language, with many new features appropriated from various programming paradigms, and some completely novel ones too.

http://msdn.microsoft.com/netframework/future/linq/

An interview with chris date

July 30th, 2005

Enabling Drillthrough in Analysis Services 2005

July 28th, 2005

future of databases

May 2nd, 2005

From ACM Queue: A Call to Arms

We live in a time of extreme change, much of it precipitated by an avalanche of information that otherwise threatens to swallow us whole. Under the mounting onslaught, our traditional relational database constructs—always cumbersome at best—are now clearly at risk of collapsing altogether.

Microsoft SQL Server Data Mining

March 28th, 2005