[plt-scheme] cross platform data persistence

From: Rohan Nicholls (rohan.nicholls at informaat.nl)
Date: Tue May 20 17:15:49 EDT 2003

Question.....

I am implementing a herbal database in scheme for a friend who is a 
naturopathic doctor, not very complex and probably no more than 10 000 
entries.

I have been thinking about how to store the data on disk, and the 
problem is that my friend uses MacOS9, might move in the future to 
MacOSX, and I prefer to develop on Linux, while some of her colleagues 
use Windows, so that should be a supportable option.

At the moment I have come up with a fairly unixy file format for storing 
the data and then keeping a few indexes to speed up searches.

Another option is to use xml, the only problem with this is speed 
although maybe I shouldn't be worrying about this.  Other issues are 
whether to keep every record in a seperate file and store the files on a 
file system with folders for different letters of the alphabet, or 
different groups of id numbers, or to have one semi-enormous file.

I would love some advice on this, as usually I use relational db's for 
this, but there are none that operate on all the platforms that plt 
does, and I think transparency is the most important issue at the 
moment, which unfortunately rdbms files are not.  Which brings up 
another question.   Is there a rdbms implemented in scheme?  A quick 
google has revealed projects planning to but no results, yet.  I know 
nothing about implementing databases, how difficult would it be?  Any 
pointers?

Thanks for your help,

Rohan

Here is an example of an record :

ASCLEPIUS TUBEROSA- Butterfly Weed, Pleurisy Root

Family-     Asclepidaceae (milk weed family), no milky sap, 1/2 m in 
height, annual, blooms mid                   to late summer, common in 
N.America

Used-         Root, harvested during summer, tincture 30-50% alcohol

Contains-     glucosides: asclepidine, asclepione,
                    Gallatoxin, resin, carbohydrate, fat & sterol

Actions-    Expectorant, anti tussive, in high doses- cathartic, diaphoretic
                  Bitter, acrid, cooling

Dosing-    Tincture- 30 gtts q couple of hours, or up to 1 tsp q couple 
of hours for cathartic effect
                Powder- 30 gm q couple of hours
                Fluid Extract- 5-30 gtts q couple of hours

Indications-    fever with strong pulse, moist skin, flushed, GI 
catarrh, will help reduce cough and                         pain by 
allowing pt to expectorate
                        Good for pneumonia, pleurisy, bronchitis
                        Pains < motion

Toxicity-     resins can cause irritation to mucous membranes
                    Caution in pregnancy- may be uterine stimulant
                    Overdose= nausea, vomiting, diarrhea and anorexia
                    Long term overdose can result in death due to 
respiratory paralysis
                    Toxic effects of the root are reduced by drying

Antidote-    emesis, GI lavage, charcoal, if diarrhea drink water mixed 
with 1/2 tsp salt and                             baking soda

C.I.        - Nausea, upset stomach

TCM-         Ma Ri Chin (A. curassavica)
                Classified as bitter & cold
                Trad use-disperse inflammation, clear heat, control 
bleeding, invigorate circulation of                     blood
                Med. Use-tonsilitis, bronchitis, bleeding, morbid 
leukorrhea, pneumonia
                Studies-some cardio effect like strophanthus kombe, 
useful for nasopharyngeal cancer

Homeo-    Asclepius tuberosa (Asclep)
                Painful respiration esp. L lung, pain in L side of 
chest, shooting downward, pain btwn                 ribs, dry cough, 
yellow, sticky catarrh, frontal h/a, <tobacco (get nausea), stool like 
                        rotten egg, prone to rheumatism, feels like 
adhesions being broken in joints.           








Posted on the users mailing list.