CD database
August 14, 2005 7:04 PM   Subscribe

I need to create a phone number directory on CD. I could just create an alphabetical directory with anchors in html, but I would love have a search function with dynamic pages. Is there a straightforward way to do this on CD?
posted by spartacusroosevelt to Technology (3 answers total)
 
tiddlywiki might work for you.
I dont think there's any easy way to import your data other than manually copying and pasting each entry though. it has incremental search and supports regexp search. all contained neatly in a single file.
posted by juv3nal at 7:25 PM on August 14, 2005


I think you'll have the best results if you implement a straightforward search engine in a well deployed cross platform client-side technology, and as such I think your choices are JavaScript, Flash, or Java. For a similar problem, freeform searching of the content in html pages on a CD, I chose JavaScript.

My solution worked as follows. I implemented the Porter stemming algorithm in Perl and JavaScript. Using a Perl script, I parsed the HTML to extract the relevant content, stemmed this content, built a master index, and then converted the index into a JavaScript data structure formatted for inclusion by a script tag. Implementing the search on the CD basically just called some JavaScript to parse the query, stem the search terms, and then present a search results page. The search results page used the stemmed search terms and the index built by the perl script to dynamically build the appropriate HTML search results. In my case I found that the index was sufficiently large that for decent performance it had to be broken into multiple pieces and thus necessitated some JavaScript that wrote other JavaScript that only loaded those pieces necessary.

You could apply my methodology to your problem, but since you're searching names and not English, you'd have to replace the Porter stemming algorithm with something appropriate for searching names. Perhaps soundex or even a simple "containing" match method?
posted by RichardP at 7:51 PM on August 14, 2005


It seems that it might be possible in XML and XSLT. My way of thinking would be this:

1) Put all of the data in one bog-ole XML files with the appropriate markup.

2) create a stylesheet to display the data in a readable fashion.

3) The search part: This is harder, I think. One could take input from the user and pass it to the stylesheet as a conditional for what is displayed. This involves forcing the XSLT to act as pseudo-SQL, which is *always* a pain. It can be done.

Advantages of this technology: Lightweight and cross-platform. Plus, the data can be converted into whatever form you might want in the future. This is what XML is for.

Disadvantages: It relies on making XML act like an RDB, which is forcing the technology into an unhappy place. Plus, more sophisticated searching will be more difficult.
posted by stet at 11:26 AM on August 15, 2005


« Older Good hair clippers with replaceable blades   |   What's the deal with Phil Sanders? Newer »
This thread is closed to new comments.