Data Abstraction Question 
Author Message
 Data Abstraction Question

Forgive my ignorance! Can someone help me "think in Lisp" about this?

Imagine a "structure or class" representing a (relational) database Relation
(table if you like), that has Attributes - a "list" of Attribute (column if
you like). (I use the term "list" loosely here to mean some aggregation, the
implementation of which may change.)

I want to abstract the way in which Attributes is implemented (good
programming, able to change later, ...). What is a good Scheme way to deal
with actions comparable to list "map" functions. Is it to implement a "map"
function for Attributes that I pass in functions to get the desired result?
Do I define a method to get-a-list of attributes and then work externally on
that with list functions?

For example I want to build functionality like build-update-stored-procedure,
etc. which could be done by mapping over the Attributes.

Alex

 -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
  http://www.*-*-*.com/ ,000+ groups
   NewsOne.Net prohibits users from posting spam.  If this or other posts



Thu, 07 Aug 2003 05:19:37 GMT  
 Data Abstraction Question

Alex>  Forgive my ignorance! Can someone help me "think in Lisp" about
Alex>  this?  Imagine a "structure or class" representing a
Alex>  (relational) database Relation (table if you like), that has
Alex>  Attributes - a "list" of Attribute (column if you like). (I use
Alex>  the term "list" loosely here to mean some aggregation, the
Alex>  implementation of which may change.)

Take a look at UncommonSQL, which implement storage classes mapped
onto a database backend. It also illustrates how Meta-Object Protocol
can be employed for practical tasks. In particular, you may want to
start from VIEW-CLASS class and CREATE-VIEW-FROM-CLASS function.

The package can be obtained via cvs:

pasword: anoncvs

Alex>  What is a good Scheme way to deal with actions comparable to
Alex>  list "map" functions.

Not sure if the above concept can be easily translated to Scheme, due
to lack of MOP (and object system, after all).
People at comp.lang.scheme may give you better advises.

--
  Eugene



Thu, 07 Aug 2003 06:10:42 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Data Abstraction Question

2. Data Abstraction

3. FP and Data Abstraction (with example)

4. DECK OF CARDS DATA ABSTRACTION

5. Data abstraction

6. F90, Data Abstraction, Object Programming, or Obfuscation?

7. F90, Data Abstraction, O

8. Data abstraction class

9. Initialising data in DATA statements question

10. ***Data buffering question. Long post, lots of questions

11. Subroutine, lambda abstraction, tacit form

12. ST stack abstraction: objects/boxing etc.

 

 
Powered by phpBB® Forum Software