oracle aide

February 1, 2013

February 13, 2012

Oracle NoSQL database: not an oxymoron anymore

Filed under: sql — Tags: — oracleaide @ 4:53 pm

Oracle NoSQL Database looks like a lot of fun.
Probably, deployed to SSD – even more.

Another prediction of an Oracle prophet came true:

“…when something truly useful database wise evolves – so evolves the RDBMS”

Of course, anyone needing fast and not-so-reliable data could simply drop ACID from a standard Oracle database by using asynchronous commit.

February 1, 2012

Model clause

Filed under: sql — Tags: , — oracleaide @ 2:49 am

Fascinating reading:

SELECT SUBSTR(country, 1, 20) country,
SUBSTR(product, 1, 15) product, year, sales
FROM sales_view
WHERE country IN ('Italy', 'Japan')
PARTITION BY (country) DIMENSION BY (product, year)
MEASURES (sales sales)
(sales['Bounce', 2002] = sales['Bounce', 2001] + sales['Bounce', 2000],
sales['Y Box', 2002] = sales['Y Box', 2001],
sales['All_Products', 2002] = sales['Bounce', 2002] + sales['Y Box', 2002])
ORDER BY country, product, year;

September 1, 2011

Made simpler: a select from a table with a multi-column composite primary key

Filed under: sql — Tags: — oracleaide @ 4:46 pm

Let’s say we have a table full of smurfs with a 3 – column primary key

create table smurfs (smurf_id int, action_date date, action_sequence int, action varchar2(30));
create index pk_smurfs on smurfs (smurf_id, action_date, action_sequence);
alter table smurfs add constraint pk_smurfs primary key (smurf_id, action_date, action_sequence);

Sample data:

Create a free website or blog at