Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Storing files in a database

by mystik (Sexton)
on Aug 11, 2003 at 03:32 UTC ( [id://282730]=note: print w/replies, xml ) Need Help??


in reply to Storing files in a database

I'll probably end up going the route of putting the files on the disk. But it does have a slight snag (that our app currently does not deal with): if we ever need to reorganize the disk structure (which would be rare), we would need to ensure that the paths in the database are updated appropriately.

... Or (thinkig out loud), in our API layer, just provide a function that generates the filename the data would be stored under.

Storing the file in a RDBMS that supports cascadeing deletes is also handy -- when we delete the primary entry, the DBMS will also clobber the files automatically for us. W/ a disk-on-file approach, we have to run an off-line clean-up script that manually clobbers files for any deleted rows.

Even still, is there a way to bind a paramater to a filehandle, and have the driver figure out the details to get that file into the DB ?

Replies are listed 'Best First'.
Re: Re: Storing files in a database
by waswas-fng (Curate) on Aug 11, 2003 at 03:57 UTC
    One advantage of storing the files in the database is that if you have a large number of servers accessing the db and files then it makes syncing updates to the files much easier. Also if those servers are on a DMZ and the db server is on another DMZ you dont need to open ports for sync software or filesharing connections (AFS/NFS/CIFS etc) or need large amounts of space on the servers for duplicated files.

    -Waswas

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-23 23:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found