Re: Abstract Data Types

From: Mikito Harakiri <nospam_at_newsranger.com>
Date: Tue, 24 Apr 2001 00:53:48 GMT
Message-ID: <w84F6.2684$QV4.223007_at_www.newsranger.com>


In article <3AE47843.EA321F9A_at_informix.com>, Paul G. Brown says...
>
> CREATE TABLE Movies (
> Title Movie_Title NOT NULL,
> Release DATE NOT NULL,
> Showing_For Period NOT NULL,
> Cinema ST_POINT NOT NULL,
> Clip Video NOT NULL
> ( PRIMARY KEY ( Title, Release ) )
> );
>
> Abstract Data Types are things like 'Movie_Title', Period, ST_Point, Video etc.
> The idea is that each of these "things" can be modeled (pretty much) as an
>object-class. There are already standards for embedding Java classes into modern
>DBMS products (SQL-J) and for surfacing the methods implemented in this class as
>expressions in the query language. Thus:
>
> SELECT M.Title, M.Release_Date
> FROM Movies M, Stars S
> WHERE S.Name = new PersonName ("Bergman", "Ingrid")
> AND Face_In_Video ( M.Clip, S.Mug_Shot)
> AND new Circle ( M.Cinema, "10 Miles").Contains( new ST_Point (:X, :Y))
> AND M.Showing_For::Overlaps ( CURRENT )
> ORDER BY 2, 1;
>
> +--------------+--------+
> | 'Casablanca' | 1941 |
> +--------------+--------+
>

Cool. Is it real Informix sql shell output?

>
> "Show me movie titles and release dates for movies showing currently within 10
>miles of lat/long (:X, :Y) where a face like Ingrid Bergman's appears in the clip."
>
> Queries very like this (syntax varies) actually run efficiently in a least my
>company's DBMS, and I'm told can be made to work OK in DB2 and shortly (within a
>year) Microsoft's SQL Server.
>

Are you requiring application developer to write custom indexes for Contains and Overlaps operators, or you reuse R-tree? How about Face_In_Video, is there some well known technique that you can reuse as well? In general, is writing custom indexes for abstract datatypes covered by SQL-J standard? Received on Tue Apr 24 2001 - 02:53:48 CEST

Original text of this message