var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Can I declare a pointer to a object that has objects inside?
CREATE TYPE category_t AS OBJECT(
CREATE TYPE cat_car_t AS OBJECT(
n_passangers number (3),
CREATE TYPE bike_car_t AS OBJECT(
engine_p number (4),
CREATE type cat_list AS OBJECT(
now suppost I point a table to the ob above
CREATE TYPE licence AS OBJECT(
citizen citizen_t (4),
category REF cat_list
is that valid?
suppose I had a table and I wanted to add a licence that would refer to one type inside the cat_list. how would I do that?
Thanks a Lot
Don't know. Are you doing this just as an exercise to learn about these features? If so, fair enough. But I would advise strongly against using this type of model as the basisi for any real database!
that is for my University. I don't think that OO DB has any future,
I don't know why they want to teach us this things.
I think the only advantdge of OO is to save some space,
and It isn't that much.
Agreed with Tony.
Oracle would support this only if you have your OTs as a part of your table. In this case, car_list type should be defined as a type in your main table.
But - in having this design, you cannot have what you wanted - "I wanted to add a licence that would refer to one type inside the cat_list"
An entry in "cat_list" cannot independently exist.
Rather than this, having a cat_list table and using foreign key relationship would work.
I must use OO concept. I can't use PK or FKs
I got it.
I am gonna do the reverse.
in each category (car, bike so on) I will add a ref to the Licence type.
The Ref works the same way as the FK. so when I add a new record in a specific category it will ref to the licence that has that category.
That was so simple and took me 2 days to figure out.
Last edited by profetas; 05-10-04 at