Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Pros help me !


Message #1 by "Shahid M. Syed" <shami_shah@h...> on Sat, 8 Mar 2003 03:45:14
Hi there Pros!

I have a website on which registered users will submit their writings, 
articles, stories etc .. means lots of text will have to be saved and 
reterieved.
I talked to someone about this; he recommened using text files for storing 
articles (pages of text) instead of storing them in database(DB) to keep 
minimum DB size.
Instead of text files I tried to do that with XML cause its hard to 
control/search/reterieve text from text files, but i encountered 2 major 
problems.. (1) I had to convert symbols like <, >, etc (2) how to perform 
quick search for a specific word in the TEXT.
See http://www.desiwriters.com/preview/12.xml for the format. There will 
be separate xml file for each user.
Now the problem 1 can be solved easily... but what about when a user wants 
to search for a specific word or phrase in all articles/writings ?
There will be hundreds or may be thousands of xml files and each xml file 
will contain many articles/writings.

Can you please guide me what is the most efficient, reliable procedure to 
adopt ?
If text is stored in database then will the text formating will be saved 
too ?

you can also reply to me by email on shami_shah@h...
Message #2 by "Walter Torres" <walter@t...> on Sat, 8 Mar 2003 22:21:52 -0600
Soundes like a perl script to me!

walter


> -----Original Message-----
> From: Shahid M. Syed [mailto:shami_shah@h...]
> Sent: Saturday, March 08, 2003 3:45 AM
> To: ASP Databases
> Subject: [asp_databases] Pros help me !
>
>
> Hi there Pros!
>
> I have a website on which registered users will submit their writings,
> articles, stories etc .. means lots of text will have to be saved and
> reterieved.
> I talked to someone about this; he recommened using text files
> for storing
> articles (pages of text) instead of storing them in database(DB) to keep
> minimum DB size.
> Instead of text files I tried to do that with XML cause its hard to
> control/search/reterieve text from text files, but i encountered 2 major
> problems.. (1) I had to convert symbols like <, >, etc (2) how to perform
> quick search for a specific word in the TEXT.
> See http://www.desiwriters.com/preview/12.xml for the format. There will
> be separate xml file for each user.
> Now the problem 1 can be solved easily... but what about when a
> user wants
> to search for a specific word or phrase in all articles/writings ?
> There will be hundreds or may be thousands of xml files and each xml file
> will contain many articles/writings.
>
> Can you please guide me what is the most efficient, reliable procedure to
> adopt ?
> If text is stored in database then will the text formating will be saved
> too ?
>
> you can also reply to me by email on shami_shah@h...

Message #3 by "Dominic Allkins" <dominic@a...> on Mon, 10 Mar 2003 08:11:56
Two possible options for you:

1. If you're running the site on Win2K/IIS then you can place all the XML 
files in a specific directory and use the inbuild indexing service for 
that directory.

Then set up the indexing search to return the results from that directory.

2. Rather than store many XML files, you'll be better off using SQL 
Server for storing the information. You can preserve the formating using 
SQL server using Server.HTMLEncode - although in reality all you need to 
do is to replace any single quotes with double single quotes to prevent 
SQL injenction attacks.

Then you can do a text search across the database.

Dominic

  Return to Index