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

Home -> Community -> Usenet -> c.d.o.misc -> Problems with select on Objects at 08

Problems with select on Objects at 08

From: Wolfgang Tomaschek <w5towo_at_uni-jena.de>
Date: Thu, 11 Jun 1998 03:38:52 +0200
Message-ID: <357F352C.8E92904D@uni-jena.de>


Hello !

I am a student of economics and at the moment a working on my thesis about object-relational DBMS. In this thesis i compare the new OR features of IBM DB2 and Oracle 8. Now i have a little problem, when i try to access (datas from) objects in a table.

There is a example in the O8 Online documentation :

create type phone_list_t as varray(10) of varchar2(20);

create Type adress_t as object
( street varchar2(200),

  city varchar2 (200),
  state char (2),
  zip varchar2(20)
);

create type customer_info_t as object
(

custno Number,
custname varchar2 (200),
adress adress_t,
phone_list phone_list_t );

create table customer_tab of customer_info_t
(Custno Primary Key);

insert into customer_tab
values
 (1 ,'Meier, Peter',
 adress_t ('Am Anger 24', 'Jena', 'Da', '07743'),   phone_list_t ('041/8620', '23/4253'));

so far, so good....

Now, if i use

select * from customer_tab;

to get all data , O8 send me an error :

ORA-00932: inconsistent datatypes

Now, to my Question : How can i get with SQL my phonenumber and adress from the Object phone_list_t;

With

Select custname from customer_tab;

i can traditional get my name, so i think that the data are in the Database correctly, but i havenīt found any way at the moment to get all datas.

I am on thee wrong way, and iīve to soluted this problem on an other way ?
 Is this generally with (Oracle)-SQL possible or have i take a higher OO-Programming language like C++ to get my Datas from the database ?

Another little Question :

Is there a possibility to join two tables with objects/attributes from objects as condition like
select table1.name, table2.name from Table1, Table2 where table1.object.atrribute=table2.object.attribute;

I think iīve got a good knowledge about traditional RDBMS and SQL-92, but my Knowledge about OODBMS isnīt the best ....;)

I would be very thankful, if you could help me at this problem and you could send me a hint or a solution to my e-Mail-Adress w5towo_at_uni-jena.de

Thanks in advance

Yours

Wolfgang Tomaschek

P.S.: Sorry, i know my english is very, very bad, but i hope you could unterstand a little bit, what i wanted to say ... :-) Received on Wed Jun 10 1998 - 20:38:52 CDT

Original text of this message

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