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

Home -> Community -> Usenet -> comp.databases.theory -> Re: Abstract Data Types

Re: Abstract Data Types

From: Paul G. Brown <paul.brown_at_informix.com>
Date: Mon, 23 Apr 2001 11:45:23 -0700
Message-ID: <3AE47843.EA321F9A@informix.com>

Robert Schiller wrote:

> In the article Thirty Years of Relational: Extending the Relational
> Model by C.J. Date, Date talks about ADTs. What does he mean by
> abstract data types in the context of the relational model?

  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. None of these things is likely to be present in a DBMS product as it installs. There are likely to be a great many of them (spatial, temporal, mathematical, document, digital signal, etc) and many are application specific (two strings, "The Sting" and "Sting, The" are equivalent "movie titles" but are not the same VARCHAR(64) strings) or algorithmically specialized (geographic projection, compare finger-prints, 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  |
     +--------------+--------+


   "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. Received on Mon Apr 23 2001 - 13:45:23 CDT

Original text of this message

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