![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
in former times (i. e. Borland Paradox) there was a data type named "Blob" (= Binary Large OBject) which was used to store pictures and/or documents. Does Postgres has a similar datatype? What is about varbin? |
#3
| |||
| |||
|
|
Does Postgres has a similar datatype? What is about varbin? Reading the documentation often helps... http://www.postgresql.org/docs/8.1/static/datatype.html http://www.postgresql.org/docs/8.1/s...pe-binary.html |
#4
| |||
| |||
|
|
"Robert Klemme" <shortcutter (AT) googlemail (DOT) com> schrieb im Newsbeitrag news:4pm85jFjnfqaU1 (AT) individual (DOT) net... Does Postgres has a similar datatype? What is about varbin? Reading the documentation often helps... http://www.postgresql.org/docs/8.1/static/datatype.html http://www.postgresql.org/docs/8.1/s...pe-binary.html I read the documentaton already. |
|
Unfortunately my question was not clearly answered. |
#5
| |||
| |||
|
|
Interpreting your question as ``does PostgreSQL allow for unspecified binary data to be stored?'', then ``The bytea data type allows storage of binary strings'', at the given URLs, would count as a clear answer. |
#6
| |||
| |||
|
|
"What datatype would experienced programmers use to store f. e. a Word-Document or a photo?" |
#7
| |||
| |||
|
|
"What datatype would experienced programmers use to store f. e. a Word-Document or a photo?" |
#8
| |||
| |||
|
|
Begin <eh4u0u$5rc$01$1 (AT) news (DOT) t-online.com On 2006-10-18, Frank Werner <fhwerner (AT) lycos (DOT) de> wrote: "What datatype would experienced programmers use to store f. e. a Word-Document or a photo?" Personally, I'd likely prefer to store them on a filesystem and pass an URL instead of streaming the data in SQL. |
#9
| |||
| |||
|
|
On 18.10.2006 14:06, jpd wrote: Personally, I'd likely prefer to store them on a filesystem and pass an URL instead of streaming the data in SQL. But you are aware of the drawbacks of this approach? Possible inconsistency, missing TX support etc. come to mind. |
|
Also, I regard an application simpler that has to pull things from the DB only vs. an application that goes to a DB *and* the file system. |
#10
| |||
| |||
|
|
Begin <4pml75Fja5pnU1 (AT) individual (DOT) net On 2006-10-18, Robert Klemme <shortcutter (AT) googlemail (DOT) com> wrote: Also, I regard an application simpler that has to pull things from the DB only vs. an application that goes to a DB *and* the file system. If you only look at one application, yes. If you look at ``making a website'' (the OP mentioned coldfusion), you pull in, well, after the OS, a webserver, coldfusion, configuration for all that, the coldfusion-enabled html files, and so on and so forth. Nevermind the database, its configuration, the schemas, and the data. |
|
If you want to keep that in sync, you're likely looking at some content management system, and for consistency you'd probably have to make that self-referential as well. So adding a couple of checks for url columns referencing datafiles somewhere in the system then isn't that much of a problem. I'll admit that putting literally everything in a database has its elegance, but the model itself only holds up to a certain point and might not be all that practical beyond that. You did mention backups, and a backup solution also needs to back it all up together. |
|
Filesystems and http are optimized to hold and transfer files, and SQL is not. You also don't gain very much of the benefits of SQL functionality because blobs tend to be opaque. So while they are useful whenever they're necessairy, making them not necessairy and doing without does have its own upsides as well. |
![]() |
| Thread Tools | |
| Display Modes | |
| |