Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Where to put an application database?

by thargas (Deacon)
on Oct 20, 2014 at 12:55 UTC ( [id://1104429]=note: print w/replies, xml ) Need Help??


in reply to Where to put an application database?

It depends on what this application uses the database for.

If you're using the database for system-wide configuration of the module, then putting the database with the module makes some sense, but I get the impression that this is not the case.

If the application uses a single database for all the users of the database, then sqlite isn't really an appropriate choice. For full-blown databases, they'll be running as a different process which will have access to the database files and that problem goes away.

If the application uses a separate database for each user, then sqlite might be appropriate, but you should allow the user to specify the database location themselves via command-line switch or environment variable or config-file or ...

Since perl has DBI, unless you're using sqlite-specific features, I'd seriously consider simply letting the user specify database connection info (dsn, user, password, attrs) and, again, the problem goes away.

  • Comment on Re: Where to put an application database?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (1)
As of 2024-04-25 01:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found