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: creating a 3 dimensional database (almost) Is it possible

Re: creating a 3 dimensional database (almost) Is it possible

From: Kevin Crosbie <caoimhinocrosbai_at_yahoo.com>
Date: Wed, 20 Apr 2005 12:07:38 +0200
Message-ID: <1113991660.052609603bfcf48f6059e3f492d96d3f@teranews>


Well, you could model it like this:

create table dimensions (

   dimension_id number primary key,
   x number not null,
   y number not null,
   z number not null);

create unique index dimensions_unq on dimensions (x, y, z);

create table dimension_cells (

   dimension_id number references dimensions,    cell number) organization index including cell;

Then, to get a cell:

select cell
  from dimension_cells c, dimensions d
where c.dimension_id = d.dimension_id

   and d.x = :x
   and d.y = :y
   and d.z = :z;

You can then extend this to support as many dimensions as you want.

Kevin

"John F. Regus" <jfregus_at_ix.netcom.com> wrote in message news:Bco9e.9129$yq6.8663_at_newsread3.news.pas.earthlink.net...
> If we look at a database, we see rows and columns. When the row and
column
> comes together there is a cell.
>
> Now the rub. Is it possible to create a three dimensional cell, so that
if
> there is more information needed other than what is in the cell, the cell
> can be extended along the z axis and the cells that follow in back of the
> original cell forms the three dimensional structure.
>
> Thanks
>
> JR
>
>
Received on Wed Apr 20 2005 - 05:07:38 CDT

Original text of this message

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