From: | Dror Matalon <dror(at)zapatec(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Servlet uplad with Multipart and LO |
Date: | 2002-07-02 16:28:17 |
Message-ID: | 20020702162817.GG41426@four.zapatec.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hi,
I'm using the com.oreilly.servlet library to handle multipart uploads
from a servlet.
Here is my understanding of the different options for storing the data
in the database.
1. Save the uploaded file in a file on the local file system and store
the meta data in the database.
Pros: Best performance, simple implementation
Cons: Separate module from the regular database stuff. Need to handle
permissions and storage issues.
2. Save the uploaded file in a bytea in the database.
Pros: Similar semantics to other data types. More simple than LO
Cons: Too slow
3. Save the uploaded file in a LO (Large Object).
Pros: Much faster than bytea,
Cons: Limited permissions. Anyone that has access to the database can
get to the LO. Slower than file storage.
I've decided to go with option 3, use Large Objects. Since in our, web
environment we provide a database to each developer we don't mind the
permissions limitations that Large Objects impose. We handle privileges
on the application level.
This seems like a very standard problem in a servlet/database
environment and yet I've looked quite a bit and searched the archives
and didn't find any discussions about this. Have I missed anything?
Dror
--
Dror Matalon
Zapatec Inc
1700 MLK Way
Berkeley, CA 94709
http://www.zapatec.com
From | Date | Subject | |
---|---|---|---|
Next Message | Nick Fankhauser | 2002-07-02 17:12:19 | Re: Connection failed |
Previous Message | webmaster | 2002-07-02 15:13:44 | Re: Connection failed |