Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Server Pricing Scheme

Re: Oracle Server Pricing Scheme

From: Michael <rbtree1_at_yahoo.com>
Date: Sun, 17 Jun 2001 18:52:25 -0400
Message-ID: <tiqd5eclvsge74@news.supernews.com>

"Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message news:tiq7es4omt0b22_at_beta-news.demon.nl... >  

> MySql lacks many, many features Oracle has, it even doesn't have row level
> locking. So, I'm not sure you can even think to use it in a 'high-level
> transaction system', whatever that might be in your opinion.

"NuSphere's new MySQL table type, gives you the power to develop professional applications. With row-level locking, crash recovery, ACID transaction properties and more, the new Enhanced MySQL has the performance, scalability and reliability required by the most demanding applications." This is a $299 enhancement to core MySql.

www.mysql.com
www.nusphere.com

While MySQL is not the "magic bullet" :-) for all database applications, it may be a cost effective alternative for many applications. Yahoo is a user of MySql not to mentions many other web sites. I am attracted to its small memory footprint and the fact that it is not encumbered with things that I do not use eg.. Jserver.

Another advanced open-source database is postgres (has it roots in Berkeley and Michael StoneBraker(sp?)) Very nice object oriented Sql Database: Look at the following constructs:

Warning: relational purists may have a problem .. but sometimes these constructs become very useful.

http://www.postgresql.org

Postgres allows columns of a table to be defined as variable-length multi-dimensional arrays. Arrays of any built-in type or user-defined type can be created. To illustrate their use, we create this table:

CREATE TABLE sal_emp (

    name text,
    pay_by_quarter integer[],
    schedule text[][]
);
The above query will create a table named sal_emp with a text string (name), a one-dimensional array of type integer (pay_by_quarter), which shall represent the employee's salary by quarter, and a two-dimensional array of text (schedule), which represents the employee's weekly schedule.

Now we do some INSERTs; note that when appending to an array, we enclose the  values within braces and separate them by commas. If you know C, this is not unlike the syntax for initializing structures.

INSERT INTO sal_emp

    VALUES ('Bill',
    '{10000, 10000, 10000, 10000}',
    '{{"meeting", "lunch"}, {}}');
INSERT INTO sal_emp

    VALUES ('Carol',
    '{20000, 25000, 25000, 25000}',
    '{{"talk", "consult"}, {"meeting"}}');

Now, we can run some queries on sal_emp. First, we show how to access a single element of an array at a time. This query retrieves the names of the employees whose pay changed in the second quarter:

SELECT name FROM sal_emp WHERE pay_by_quarter[1] <> pay_by_quarter[2];  name



 Carol
(1 row)
Postgres uses the "one-based" numbering convention for arrays, that is, an array of n elements starts with array[1] and ends with array[n].

This query retrieves the third quarter pay of all employees:

SELECT pay_by_quarter[3] FROM sal_emp;
 pay_by_quarter


          10000
          25000

(2 rows)
To search for a value in an array, you must check each value of the array. This can be done by hand (if you know the size of the array):
SELECT * FROM sal_emp WHERE pay_by_quarter[1] = 10000 OR
                            pay_by_quarter[2] = 10000 OR
                            pay_by_quarter[3] = 10000 OR
                            pay_by_quarter[4] = 10000;
However, this quickly becomes tedious for large arrays, and is not helpful if the size of the array is unknown. Although it is not part of the primary PostgreSQL distribution, in the contributions directory, there is an extension to PostgreSQL that defines new functions and operators for iterating over array values. Using this, the above query could be: SELECT * FROM sal_emp WHERE pay_by_quarter[1:4] *= 10000;

To search the entire array (not just specified columns), you could use: SELECT * FROM sal_emp WHERE pay_by_quarter *= 10000; Received on Sun Jun 17 2001 - 17:52:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US