Why Do We Need Databases?

I l @ ve RuBoard

Well, one reason is so that Larry Ellison of Oracle can afford to keep himself on Prozac when he thinks about Bill Gates. A more serious answer is the same reason that drove man to first press a stick against a piece of wet mud: because it's good to write things down.

Web servers are marvelous creatures , but they're a bit like idiot savants. Ask them to serve a Web page or run a piece of Java, and they perform like a champ. But start asking them to remember what they did five minutes ago, and they develop amnesia faster than a character in a soap opera.

The first and most important reason that you use databases is that there's a lot in an e-commerce transaction that you need to remember and track:

  • A user 's name , address, credit card, and other information previously entered on a registration page

  • hat the user might have put into a shopping cart and left from a previous transaction

  • What items are in stock, along with their price, description, and so on

  • Orders that need to be fulfilled, orders that have been shipped, and items that have been backordered

Now, you could store all this information in a flat file on the server's hard disk, but there are other important properties that you want to have for this data:

  • You want to be able to back out a transaction if part of it fails.

  • You want to be able to locate the data somewhere more secure than the Web server, which could be in a DMZ or outside the firewall altogether.

  • You want to be able to access data such as user data or products quickly, even if there are thousands or millions of them.

When you add these items to the shopping list, only a relational database will really do the job effectively.

Oracle

There's no question that Oracle is the heavyweight of the database business. Oracle is the dominant player, and for good reason. It offers a powerful, flexible, and reliable engine that is powering a good- sized piece of corporate America.

Unfortunately, Oracle's products are also rather expensive. Oracle licenses fall under the "if you have to ask, you can't afford it" category. But if you need it, you need it, regardless of the price.

Everyone Else

It might seem a bit flippant to stick Sybase, Ingres, IBM, and Microsoft into one lump. But the reality is, if you're not talking about Oracle, you're basically in the also-rans of market share. Microsoft has made a valiant effort to convince businesses that SQL Server is a viable alternative to Oracle, but it's an uphill battle and one that Microsoft doesn't seem to be winning.

To some extent, it doesn't really matter which database you use, and because the customer might already be using one, it's not a matter that you might have much control over. The important thing is, because all of the databases allow you to get to them via the Java Database Connectivity library (JDBC), as long as you don't write your SQL using proprietary syntax, you can move from one to another with ease.

I l @ ve RuBoard


MySQL and JSP Web Applications. Data-Driven Programming Using Tomcat and MySQL
MySQL and JSP Web Applications: Data-Driven Programming Using Tomcat and MySQL
ISBN: 0672323095
EAN: 2147483647
Year: 2002
Pages: 203
Authors: James Turner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net