Re: File upload to database ?

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 39138
interpreted = N
texte = Alain Russell wrote: > > Can a file be written to a database when being uploaded ?? > > Ie. Instead of using [writefile ....] on the page being posted to can the > file data be written to a database and then re-written at a later date as > needed, or will WebCat do strange things to it .. ? > Is the file text only? If the answer is no, then you cannot store the data in a database. Actually you could, but you would have to encode as text (like in Base64 or something like tar). But this is really besides the point.It is also an incredibly dumb idea (no offense intended). The only reason to have any data in a table is because you intend to search it. This goes for WebCat as well as any other database. If you never intend to search the contents of a field, it does not belong in a table (except if it is closely related to a search field and is small).Now, I am sure that there are plenty of people who will say, RAM is cheap and that is how I have always done it to which I have to say that this is a general rule of thumb. If you only embed a chunk of text in a page in response to a specific query, and never query that text directly, it is better stored in the file system than in RAM. RAM may be cheap, but storage is cheaper by a factor of 60 or more (1GB RAM = $200, 30 GB HD = $99).I just got through working with our site developers to move the sample chapters off of our main web server, because they really don't belong there either. There is now a frame page located on the primary server that embeds the large text files from another server. This all goes to the idea of online, nearline, and offline. I store as little text in databases as possible (basically only fields that are searchable and small, tightly related fields). Large text files and graphics files are stored on a second server that doesn't have much to do (i.e. it does not have WebCat loaded at all and does no CGI pages at all).John-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: File upload to database ? (John Peacock 2001)
  2. File upload to database ? (Alain Russell 2001)
Alain Russell wrote: > > Can a file be written to a database when being uploaded ?? > > Ie. Instead of using [writefile ....] on the page being posted to can the > file data be written to a database and then re-written at a later date as > needed, or will WebCat do strange things to it .. ? > Is the file text only? If the answer is no, then you cannot store the data in a database. Actually you could, but you would have to encode as text (like in Base64 or something like tar). But this is really besides the point.It is also an incredibly dumb idea (no offense intended). The only reason to have any data in a table is because you intend to search it. This goes for WebCat as well as any other database. If you never intend to search the contents of a field, it does not belong in a table (except if it is closely related to a search field and is small).Now, I am sure that there are plenty of people who will say, RAM is cheap and that is how I have always done it to which I have to say that this is a general rule of thumb. If you only embed a chunk of text in a page in response to a specific query, and never query that text directly, it is better stored in the file system than in RAM. RAM may be cheap, but storage is cheaper by a factor of 60 or more (1GB RAM = $200, 30 GB HD = $99).I just got through working with our site developers to move the sample chapters off of our main web server, because they really don't belong there either. There is now a frame page located on the primary server that embeds the large text files from another server. This all goes to the idea of online, nearline, and offline. I store as little text in databases as possible (basically only fields that are searchable and small, tightly related fields). Large text files and graphics files are stored on a second server that doesn't have much to do (i.e. it does not have WebCat loaded at all and does no CGI pages at all).John-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ John Peacock

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

LineItem variable set (2007) 'does not contain' operator needed ... (1997) Email Mac (2002) (1997) Urgent help needed (1998) [capitalize] (2005) [ot] Google Optomizations (2004) Cumulative Shipping charge calculations - your help please. (1997) Hiding files/images. (2000) Q: for those who use Cookies for sessions? (2004) WebCatalog can't find database (1997) WebCatalog Technical Reference (1997) Resume Catalog ? (1997) Execute Applescript (1997) testing new mail server sorry (1998) No Wanna Duppys (1998) Stop the madness. (1997) Special delete ... (1997) DNS Lookup 2 (2000) All choices on IE different than Netscape (1997)