Beefy Boxes and Bandwidth Generously Provided by pair Networks chromatic writing perl on a camel
We don't bite newbies here... much
 
PerlMonks  

Re: Re: Being Forced to Fork with Nested Regular Expressions

by Ovid (Cardinal)
on Jan 02, 2004 at 18:11 UTC ( #318385=note: print w/ replies, xml ) Need Help??


in reply to Re: Being Forced to Fork with Nested Regular Expressions
in thread Being Forced to Fork with Nested Regular Expressions

With DBD::SQLite, this might be a viable option if I can figure out how to structure this. I've seen this discussed before and, if it works, I can push the hard part of matching down to the C level and get a huge performance boost. I'll have to see how robust the SQLite SQL implementation is. As I recall, it's pretty good (and here's an instance where I think a typeless database like SQLite is fine).

Cheers,
Ovid

New address of my CGI Course.


Comment on Re: Re: Being Forced to Fork with Nested Regular Expressions
Re: Re: Re: Being Forced to Fork with Nested Regular Expressions
by paulbort (Hermit) on Jan 02, 2004 at 20:43 UTC
    Yeah, typeless is no problem in this case. I don't know SQLite at all, but as long as it can do sub-selects ( the IN ( SELECT ...) part ), it should be fine. I'm not sure when you say 'structure this' if you mean the database, or the Perl code. The Perl code probably needs to be set up as a shell, where you can make assertions (which will be written to the database) ask questions (which will query the database), and do housekeeping (save db, restore db, wipe db, quit, etc.) Like a PROLOG interpreter.

    The only interesting thing I'd worry about with the database to start with would be using serial numbers instead of names when describing relationships, so that you can rename things if necessary. (Without this, renaming breaks all relationships.) Next might include quantities ( book worth 5 shekels ). Note that you don't need to add classes to the database, you can simply add the 'is a' relationship, and ( 1984 is a book ) works.

    --
    Spring: Forces, Coiled Again!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://318385]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2014-04-19 16:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (483 votes), past polls