Re: OODB question?

From: akmal <akmal_at_nospam.soi.city.ac.uk>
Date: 2000/03/31
Message-ID: <Pine.GSO.3.95.1000331194801.24111A-100000_at_vega.soi.city.ac.uk>#1/1


On Sat, 1 Apr 2000, Dora wrote:

> Date: Sat, 01 Apr 2000 02:09:55 +0800
> Newsgroups: comp.databases.object, comp.databases.theory, comp.databases,
> comp.object
> Subject: OODB question?
>
> I've some questions about the UniSQL database.
>
> How can I get back the schema after I create some classes?
> After I get all schema, how can I download the data from the UniSQL
> database?
> Do I need to create a text file before I download the data?
>
>
>

Hi Dora!

Not sure what you mean. You need to create the schema and load into UniSQL before you create classes anyway. The schema file may have extended SQL statements, thus:

CREATE CLASS part
;
CREATE CLASS conn
;
ALTER CLASS part ADD ATTRIBUTE
 id integer,
 part_type char(11),
 x integer,
 y integer,
 build integer,
 connected_to set(conn),
 connected_from set(conn)
;
ALTER CLASS conn ADD ATTRIBUTE
 from_part part,
 to_part part,
 conn_type char(11),
 length integer
;

COMMIT WORK; UniSQL comes with some tools that will allow you to dump out the database - check the manuals. The format may be something like this when written-out:

%id glo_name 6
%id glo_holder 7
%id glo 8
%id part 9
%id conn 10
%id audio 11
%id slcaudio 12
%id agent 13
%id audio_agent 14
%id image 15
%id twod_image 16
%id threed_image 17
%id pbm 18
%id rawpbm 19
%id x11bitmap 20
%class part (build y x id part_type connected_from connected_to)
1: 436436119 43359 61358 1 'part-type4 ' {_at_10|1} {_at_10|2,  _at_10|3,
 _at_10|4}
2: 578654140 18509 70911 2 'part-type5 ' {_at_10|5} {_at_10|6,  _at_10|7,
 _at_10|8}
...
...
...

etc.

If you have a complex schema, the utility will still write it out to a text file, but then it is your responsibility to "munge" the data into a suitable format for loading into something else.

HTH akmal Received on Fri Mar 31 2000 - 00:00:00 CEST

Original text of this message