Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: creating a 3 dimensional database (almost) Is it possible
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