If I do this, should I even put the text in the
database?  It seems like it would just be taking up
space for no particular reason.  

If I keep the actal text and the HTML page seperate
(by writing the text to a file of it's own and then
using <!-- include .... --> inside the HTML) I could
also just include/read the text file when the user
wanted to update.  Other wise, I'd have the data
stored in two places and that's really a pet peive of
mine, ...

what do you think?

also what about scalability .. what if there are
30,000 page.  would 30,000 -- which would take up more
space, 30,000 text files with 8000 characters in them,
.. or 30,000 entries in a database like this:

Unique_ID  INT
User_ID    INT
Message    VARCHAR(8000)

And for that matter, which usually costs more, more
disk space or more SQL database space?

Wow, I'm just full of questions today!

Andy


--- Sam Thompson <[EMAIL PROTECTED]> wrote:
> Creating an index.html file for each user which is
> updated only when they
> choose it to be sounds like the best way to me,
> because you only have to
> serve an HTML page and theres no Database or FSO
> overhead involved.
> 
> HTH
> Sam
> 
> 
> ----- Original Message -----
> From: "Andy Alexander" <[EMAIL PROTECTED]>
> To: "ActiveServerPages"
> <[EMAIL PROTECTED]>
> Sent: Tuesday, October 15, 2002 11:50 AM
> Subject: Database vs. TextFile for storage
> 
> 
> > Hi,
> >
> > I have a few questions about storing information
> in a
> > .txt file rather than my database (or a little of
> > both).  Let me explain:
> >
> >
> > (The site is an online community)
> >
> > -- I'm working to create a simple feature for my
> site
> > that will allow my members to create their own
> 'page'
> > on the site.  The page will consist of some
> dynamic
> > data (profile information taken from the database
> --
> > and formatted identically for each user) and I'd
> also
> > like to give them the option to create their own
> > 'message' for the meat of the page.  I might even
> > allow a few HTML tags with their text (right now I
> > filter out all HTML/Script tags before inserting
> in to
> > the database, but the way the function is
> designed, I
> > have the ability to pick and choose which tags are
> > allowed to pass -- ie.  <ahref=""></a> tags are
> > currently allowed)
> >
> > Also, I'm planning on using the FileSystem to
> create
> > new a directory with the users name
> > (http://members.mixedrace.com/USERNAME) so that
> they
> > can send the link out to friends -- and draw
> people to
> > the site.  To do this (unless I find another way),
> I'd
> > have to use the filesystem object to create a new
> > directory with the user's name, and then create a
> > simple HTML filed called index.asp and put it
> inside
> > every user's folder.  The text file would probably
> > just contain a 'response.redirect' to a dynamic
> page
> > that would process the username and load the
> dynamic
> > info for that user.
> >
> > Sounds simple enough and I know exactly how to do
> it,
> > ... I'm just wondering about a few things:
> >
> > 1)  a) If I allow the user to add up to 8000
> > characters (or whatever the varchar limit is) for
> > their text, wouldn't my database start getting
> really
> > big really quickly (and slowing down?)
> >
> > or
> >
> >     b)  is text in a database compressed once
> inside?
> > (would 8000 chars take up the equivilent database
> > space as a .txt file with 8000 chars would take up
> in
> > disk space?)
> >
> > 2)  Considering that these pages would become a
> > popular part of the site, wouldn't it become
> really
> > taxing on the database to send this 8000 char
> message
> > along with all the profile information for every
> user
> > / for every page view?  (although I suppose it's
> > really just the same as serving articles)
> >
> > 3)  Would I be better served to use the FileSystem
> > object to write the message to a .txt or HTML file
> and
> > the either:
> >    a)  store the message / profile info in the
> > database as well and use it to create/update a
> HTML
> > page located in the user's directory ONLY when the
> > page changes (is updated)?
> >
> > or
> >
> >    b)  only write the information to a .txt file
> in
> > the user's directory.  Have the HTML page, also in
> > their directory, either do a fileread or include
> to
> > get the message directly for the disk -- and do a
> > fileread/include to load the information back in
> to a
> > textbox when the user wants to update their page?
> >
> >
> >
> > -----------
> >
> > I know that's a lot to swallow, ... but I hope
> that
> > someone out their can help me out!
> >
> > Thanks A LOT!
> >
> > Andy
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Faith Hill - Exclusive Performances, Videos & More
> > http://faith.yahoo.com
> >
> > ---
> > You are currently subscribed to activeserverpages
> as:
> [EMAIL PROTECTED]
> > To unsubscribe send a blank email to
> %%email.unsub%%
> 
> 
> ---
> You are currently subscribed to activeserverpages
> as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
%%email.unsub%%


__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to