Archive for the ‘Database’ Category


A Good Demo of SQl Join

October 12, 2007

Are you clear with INNER and OUTER JOIN of SQL tables. This post presents a good illustration in diagram to explain them. Look it at link


Oracle 11g released

July 11, 2007

Oracle 11g is focused on supporting fast-moving businesses and the hundreds of terabytes of data they accumulate, said Bob Shimp, Oracle’s vice president of product marketing. It supports faster application deployments and is more efficient at using storage than previous releases, he said. Read more


PostgreSQL publishes first real benchmark

July 9, 2007

It’s the first real benchmark published with PostgreSQL. While plenty of bloggers have posted a variety of informal performance tests, only an industry-standard and peer-validated benchmark is sufficient to assure potential users that they’re making the right choice of platform. Given some of my conversations with large corporate customers, I expect this benchmark to influence corporate software buyers.

No more “slow elephant.” For ages a reputation of sluggish performance has dogged the PostgreSQL project, due to both unfavorable comparisons with MySQL back in 1998 and due to our ongoing lack of auto-configuration (yes, yes, I’m working on it!). This publication shows that a properly tuned PostgreSQL is not only as fast or faster than MySQL, but almost as fast as Oracle (since the hardware platforms are different, it’s hard to compare directly). This is something we’ve been saying for the last 2 years, and now we can prove it.

Why pay more? As I said, almost as fast as Oracle. While the list of Spec publications on affordable commodity hardware is sparse, there are some. For example, the 874 JOpS@Standard on Oracle 10+Itanium+HP-UX. That’s less than 15% faster than our PostgreSQL publication.

Read more


Database Design Basics

April 28, 2007

Wrox::Wrox Article:Database Design Basics:

There is a common belief that database design is done by the database administrator (DBA), while program design is done by programmers. While this may seem like a natural division of labor, it is actually quite unfortunate. Applications are made up of two equal and interrelated parts: data and processes. Neither has any purpose without the other and weaknesses in the design of either (or their intimate relationship) will be reflected in the entire system….


SQL Injection

March 18, 2007

SQL Injection Cheat Sheet:

Currently only for MySQL and Microsoft SQL Server, some ORACLE and some PostgreSQL. Most of samples are not correct for every single situation. Most of the real world environments may change because of parenthesis, different code bases and unexpected, strange SQL sentences.


Top 10 Largest Databases in the World

February 16, 2007

……There are currently organizations around the world in the business of amassing collections of things, and their collections number into and above the trillions. In many cases these collections, or databases, consist of items we use every day.

In this list, we cover the top 10 largest databases in the world: Read more


Get the latest record from a table

February 15, 2007

Suppose we have a table orders like this:

orderID itemID customer placeDate
1 123 Tom 2007/1/2 1:30PM
2 213 Tom 2007/2/6 2:00PM
3 312 Tom 2007/1/8 8:00AM
4 123 Mary 2006/2/9 5:00PM

If we want to get the latest order Tom placed, here is the query for Postgres

SELECT orderID, placedDate
FROM orders, (SELECT MAX(placeDate) AS date
FROM orders
WHERE customer = 'Tom'
GROUP BY customer) sub
WHERE placeDate =