home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / lisp / mcl / 1562 < prev    next >
Encoding:
Internet Message Format  |  1992-11-09  |  2.3 KB

  1. Path: sparky!uunet!spool.mu.edu!agate!apple!apple!cambridge.apple.com!bill@cambridge.apple.com
  2. From: bill@cambridge.apple.com (Bill St. Clair)
  3. Newsgroups: comp.lang.lisp.mcl
  4. Subject: Re: Database Implementation Naivete
  5. Message-ID: <9211091648.AA21770@cambridge.apple.com>
  6. Date: 9 Nov 92 17:52:33 GMT
  7. Sender: info-mcl-request@cambridge.apple.com
  8. Lines: 36
  9. Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
  10. Full-Name: Bill St. Clair
  11. Original-To: Kevin G. Joback <Kevin@SCANDIUM.mks.dialnet.symbolics.com>
  12. Original-Cc: info-mcl
  13.  
  14. >I am considering implementing a database in lisp for managing
  15. >information on chemicals. Till now I have been saving objects to files
  16. >and then reloading them. With the number of chemicals now approaching
  17. >2000 this process takes too much time. Additionally I never take
  18. >advantage of having all the information loaded.
  19. >
  20. >My needs are quite minimal. No transaction restarts or SQL (yet).
  21. >
  22. >I thought a file in a specified, fixed format could be used to store the
  23. >information. The FILE-POSITION function would be used to move around the
  24. >file. READ-CHAR, WRITE-CHAR, READ, WRITE, etc. used to retrieve and store
  25. >information.
  26. >
  27. >Being inexperienced in this area I have several questions:
  28. >
  29. >1) Is this approach likely to work? I know commercial databases offer
  30. >numerous capabilities which probably make them very complex to implement
  31. >but can one start small?
  32.  
  33. You can certainly do it with that approach, but READ-CHAR & WRITE-CHAR
  34. will likely be quite slow. You'll end up spending a lot of time
  35. managing the memory in the file and indexing your information so that
  36. you can find it. I've written a simple object oriented database that
  37. may fit the bill. It's called "Wood" and is available for anonymous
  38. FTP from cambridge.apple.com in the file "/pub/mcl2/contrib/wood-0.5.sea.hqx".
  39. If you don't want to download the whole thing, the documentation is
  40. in the file "/pub/mcl2/contrib/wood.doc".
  41.  
  42. >
  43. >2) Are there any references which discuss the implementation of simple
  44. >databases? I have found countless books on database architecture and
  45. >implementation issues but none on how to sit down and start coding.
  46.  
  47. I don't know of anything. For Wood, I read a little bit about B-trees and
  48. transactions & recovery (which is not yet part of Wood, but will be
  49. eventually if I get the time to work on it), then started coding.
  50.