home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / database / theory / 650 < prev    next >
Encoding:
Internet Message Format  |  1992-12-14  |  1.6 KB

  1. Path: sparky!uunet!mcsun!uknet!keele!news
  2. From: csa09@seq1.keele.ac.uk (Paul Singleton)
  3. Newsgroups: comp.databases.theory
  4. Subject: Re: date -> day of week conversion
  5. Message-ID: <Bz9B9C.BBD@gabriel.keele.ac.uk>
  6. Date: 14 Dec 92 16:03:11 GMT
  7. References: <dtb.724154401@otto>
  8. Sender: news@gabriel.keele.ac.uk (UseNet News Service)
  9. Organization: Keele University, England
  10. Lines: 25
  11. Nntp-Posting-Host: seq1.cc.keele.ac.uk
  12.  
  13. From article <dtb.724154401@otto>, by dtb@otto (David Bath):
  14.  
  15. > csa09@keele.ac.uk (Paul Singleton) writes:
  16. ...
  17. >>Am I right in thinking that this is *not* the sort of functionality which
  18. >>SQL was designed to express, and that in general it is not feasible to
  19. >>define a relation by algorithm (in the way that Prolog programmers are so
  20. >>accustomed to doing)?
  21.  
  22. > Rumor has it that one SQL based DB, Empress, running on UNIX and VMS,
  23. > permits you to define your own functions that can be embedded in the
  24. > sql, letting you define that function and then
  25. >     select surname, givname
  26. >     where    day_of_week(birthdate) = 'Saturday'
  27. >     from     emp;
  28.  
  29. OK so I can define a function for use in a join condition, but I really
  30. want to define a virtual table, some of whose columns are functions of
  31. other columns.  I can see that SQL syntax doesn't accommodate this concept,
  32. although I claim it is a reasonable thing to want to do.
  33. ----
  34.   __   __    Paul Singleton (Mr)           JANET: paul@uk.ac.keele.cs
  35.  |__) (__    Computer Science Dept.        other: paul@cs.keele.ac.uk
  36.  |  .  __).  Keele University, Newcastle,    tel: +44 (0)782 621111 x7355
  37.              Staffs ST5 5BG, ENGLAND         fax: +44 (0)782 713082
  38.