Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Article Storage: Files vs. Database

Reply
Thread Tools

Article Storage: Files vs. Database

 
 
Jonathan Wood
Guest
Posts: n/a
 
      06-04-2008
I'd like to build a Website that contains many articles. Two basic
approaches are to either store the articles in aspx files, possibly indexed
by the database, or to store the article text in the database.

Some advantages of storing them in files are simplicity, and efficiency.

Some advantages of storing them in the database are ease of some operations,
and the option of using SQL Server 2005 text index to implement search.

Can anyone else offer some considerations for choosing between these two
approaches?

Thanks.

Jonathan

 
Reply With Quote
 
 
 
 
George Ter-Saakov
Guest
Posts: n/a
 
      06-04-2008
You said "Some advantages of storing them in files are simplicity, and
efficiency"
I think you are mistaken here.

Simplicity: I do not see any difference between pulling article conent from
database and from file. Actually it would be easier to use DB since besides
content you might have bunch of additional properties assigned to the
article. Like "Topic", Thumbnail image, Header. When you need to show list
of "Todays" article what are you going to do if you keep them as files?

Efficiency: It's much more efficient to pull data from DB than from the file
system. Simply because DB designed for that. It offers indexes and such.
FileSystem does not have it. It always scans the folder in order to find the
file.




George.



"Jonathan Wood" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> I'd like to build a Website that contains many articles. Two basic
> approaches are to either store the articles in aspx files, possibly
> indexed by the database, or to store the article text in the database.
>
> Some advantages of storing them in files are simplicity, and efficiency.
>
> Some advantages of storing them in the database are ease of some
> operations, and the option of using SQL Server 2005 text index to
> implement search.
>
> Can anyone else offer some considerations for choosing between these two
> approaches?
>
> Thanks.
>
> Jonathan
>



 
Reply With Quote
 
 
 
 
Peter Bromberg [C# MVP]
Guest
Posts: n/a
 
      06-04-2008
We use databases almost exclusively for this kind of "stuff". Its easier to
search, index, etc. and the content can be populated into a "templatized"
article page. It can also be cached via Partial page caching.
Peter

"Jonathan Wood" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> I'd like to build a Website that contains many articles. Two basic
> approaches are to either store the articles in aspx files, possibly
> indexed by the database, or to store the article text in the database.
>
> Some advantages of storing them in files are simplicity, and efficiency.
>
> Some advantages of storing them in the database are ease of some
> operations, and the option of using SQL Server 2005 text index to
> implement search.
>
> Can anyone else offer some considerations for choosing between these two
> approaches?
>
> Thanks.
>
> Jonathan
>


 
Reply With Quote
 
Jonathan Wood
Guest
Posts: n/a
 
      06-04-2008
George,

> Simplicity: I do not see any difference between pulling article conent
> from database and from file. Actually it would be easier to use DB since
> besides content you might have bunch of additional properties assigned to
> the article. Like "Topic", Thumbnail image, Header. When you need to show
> list of "Todays" article what are you going to do if you keep them as
> files?
>
> Efficiency: It's much more efficient to pull data from DB than from the
> file system. Simply because DB designed for that. It offers indexes and
> such. FileSystem does not have it. It always scans the folder in order to
> find the file.


Well, I'm looking for input. But I personally think a link to an existing
file is simpler than loading data from a database. And I hear all the time
how loading a straight file is more efficient than one that is loaded from
the database.

Jonathan

 
Reply With Quote
 
Jonathan Wood
Guest
Posts: n/a
 
      06-04-2008
Yeah, these are definitely some of the advantages. Have you made use of SQL
Server 2005's full-text indexing yet? With file-based articles, implementing
search is a pain.

Also, would love to see some samples of the sites you are referring to if
any of them are public.

Jonathan

"Peter Bromberg [C# MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> We use databases almost exclusively for this kind of "stuff". Its easier
> to search, index, etc. and the content can be populated into a
> "templatized" article page. It can also be cached via Partial page
> caching.
> Peter
>
> "Jonathan Wood" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> I'd like to build a Website that contains many articles. Two basic
>> approaches are to either store the articles in aspx files, possibly
>> indexed by the database, or to store the article text in the database.
>>
>> Some advantages of storing them in files are simplicity, and efficiency.
>>
>> Some advantages of storing them in the database are ease of some
>> operations, and the option of using SQL Server 2005 text index to
>> implement search.
>>
>> Can anyone else offer some considerations for choosing between these two
>> approaches?
>>
>> Thanks.
>>
>> Jonathan
>>

>


 
Reply With Quote
 
George Ter-Saakov
Guest
Posts: n/a
 
      06-05-2008
That was my point. Efficiency and ease to work with of static file is only
an illusion.
You will end up with nightmare if you need to change the logo or something
like that in 1000s of static pages.


George.

"Jonathan Wood" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> George,
>
>> Simplicity: I do not see any difference between pulling article conent
>> from database and from file. Actually it would be easier to use DB since
>> besides content you might have bunch of additional properties assigned to
>> the article. Like "Topic", Thumbnail image, Header. When you need to show
>> list of "Todays" article what are you going to do if you keep them as
>> files?
>>
>> Efficiency: It's much more efficient to pull data from DB than from the
>> file system. Simply because DB designed for that. It offers indexes and
>> such. FileSystem does not have it. It always scans the folder in order to
>> find the file.

>
> Well, I'm looking for input. But I personally think a link to an existing
> file is simpler than loading data from a database. And I hear all the time
> how loading a straight file is more efficient than one that is loaded from
> the database.
>
> Jonathan
>



 
Reply With Quote
 
George Ter-Saakov
Guest
Posts: n/a
 
      06-05-2008
Implementing search functionality is pain.You might do it yourself or get
some third party solution like dtSearch or open source (just google "serarch
engine open source")

But from my experience the SQL server's full-text do not do a good job.

George.


"Jonathan Wood" <(E-Mail Removed)> wrote in message
news:eLKyj%(E-Mail Removed)...
> Yeah, these are definitely some of the advantages. Have you made use of
> SQL Server 2005's full-text indexing yet? With file-based articles,
> implementing search is a pain.
>
> Also, would love to see some samples of the sites you are referring to if
> any of them are public.
>
> Jonathan
>
> "Peter Bromberg [C# MVP]" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> We use databases almost exclusively for this kind of "stuff". Its easier
>> to search, index, etc. and the content can be populated into a
>> "templatized" article page. It can also be cached via Partial page
>> caching.
>> Peter
>>
>> "Jonathan Wood" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> I'd like to build a Website that contains many articles. Two basic
>>> approaches are to either store the articles in aspx files, possibly
>>> indexed by the database, or to store the article text in the database.
>>>
>>> Some advantages of storing them in files are simplicity, and efficiency.
>>>
>>> Some advantages of storing them in the database are ease of some
>>> operations, and the option of using SQL Server 2005 text index to
>>> implement search.
>>>
>>> Can anyone else offer some considerations for choosing between these two
>>> approaches?
>>>
>>> Thanks.
>>>
>>> Jonathan
>>>

>>

>



 
Reply With Quote
 
Jonathan Wood
Guest
Posts: n/a
 
      06-05-2008
I'm not sure what you meant by "that was my point" as you seemed to be
making a different point.

As far as changing the appearance of the pages, stylesheets and master pages
should prevent the need to mess with the pages once created.

I'm not saying I would not choose to use databases. But I'm afraid I don't
see simplicity and efficiency as the reasons to do so.

Thanks.

Jonathan

"George Ter-Saakov" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> That was my point. Efficiency and ease to work with of static file is only
> an illusion.
> You will end up with nightmare if you need to change the logo or something
> like that in 1000s of static pages.
>
>
> George.
>
> "Jonathan Wood" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> George,
>>
>>> Simplicity: I do not see any difference between pulling article conent
>>> from database and from file. Actually it would be easier to use DB since
>>> besides content you might have bunch of additional properties assigned
>>> to the article. Like "Topic", Thumbnail image, Header. When you need to
>>> show list of "Todays" article what are you going to do if you keep them
>>> as files?
>>>
>>> Efficiency: It's much more efficient to pull data from DB than from the
>>> file system. Simply because DB designed for that. It offers indexes and
>>> such. FileSystem does not have it. It always scans the folder in order
>>> to find the file.

>>
>> Well, I'm looking for input. But I personally think a link to an existing
>> file is simpler than loading data from a database. And I hear all the
>> time how loading a straight file is more efficient than one that is
>> loaded from the database.
>>
>> Jonathan
>>

>
>


 
Reply With Quote
 
Jonathan Wood
Guest
Posts: n/a
 
      06-05-2008
Can you elaborate on this? The full-text indexing was created for exactly
this purpose. Why does it not do a good job, or is a pain to use?

Thanks.

Jonathan

"George Ter-Saakov" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Implementing search functionality is pain.You might do it yourself or get
> some third party solution like dtSearch or open source (just google
> "serarch engine open source")
>
> But from my experience the SQL server's full-text do not do a good job.
>
> George.
>
>
> "Jonathan Wood" <(E-Mail Removed)> wrote in message
> news:eLKyj%(E-Mail Removed)...
>> Yeah, these are definitely some of the advantages. Have you made use of
>> SQL Server 2005's full-text indexing yet? With file-based articles,
>> implementing search is a pain.
>>
>> Also, would love to see some samples of the sites you are referring to if
>> any of them are public.
>>
>> Jonathan
>>
>> "Peter Bromberg [C# MVP]" <(E-Mail Removed)> wrote in
>> message news:(E-Mail Removed)...
>>> We use databases almost exclusively for this kind of "stuff". Its easier
>>> to search, index, etc. and the content can be populated into a
>>> "templatized" article page. It can also be cached via Partial page
>>> caching.
>>> Peter
>>>
>>> "Jonathan Wood" <(E-Mail Removed)> wrote in message
>>> news:%(E-Mail Removed)...
>>>> I'd like to build a Website that contains many articles. Two basic
>>>> approaches are to either store the articles in aspx files, possibly
>>>> indexed by the database, or to store the article text in the database.
>>>>
>>>> Some advantages of storing them in files are simplicity, and
>>>> efficiency.
>>>>
>>>> Some advantages of storing them in the database are ease of some
>>>> operations, and the option of using SQL Server 2005 text index to
>>>> implement search.
>>>>
>>>> Can anyone else offer some considerations for choosing between these
>>>> two approaches?
>>>>
>>>> Thanks.
>>>>
>>>> Jonathan
>>>>
>>>

>>

>
>


 
Reply With Quote
 
Jonathan Wood
Guest
Posts: n/a
 
      06-05-2008
Yes, I agree that a database will be needed for one purpose or another.

But then how good are my options for implementing search functionality?

Thanks.

Jonathan

"Patrice" <http://www.chez.com/scribe/> wrote in message
news:(E-Mail Removed)...
> Unless you have really simple needs (is this a static site now and for the
> foreseeable future ?) I would use a DB. It's likely you'll have anyway to
> store other data thna just the description for each article (price,
> availability, mark them as deleted, category, user ratings or whatever
> else).
>
> --
> Patrice
>
> "Jonathan Wood" <(E-Mail Removed)> a écrit dans le message de groupe
> de discussion : #(E-Mail Removed)...
>> I'd like to build a Website that contains many articles. Two basic
>> approaches are to either store the articles in aspx files, possibly
>> indexed by the database, or to store the article text in the database.
>>
>> Some advantages of storing them in files are simplicity, and efficiency.
>>
>> Some advantages of storing them in the database are ease of some
>> operations, and the option of using SQL Server 2005 text index to
>> implement search.
>>
>> Can anyone else offer some considerations for choosing between these two
>> approaches?
>>
>> Thanks.
>>
>> Jonathan
>>

>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Database Database Database scott93727@gmail.com Computer Information 0 09-27-2012 02:43 AM
DataBase DataBase DataBase DataBase scott93727@gmail.com Computer Information 0 09-26-2012 09:40 AM
Can I use XML as an article database ? Alvin SIU XML 2 05-29-2007 09:46 AM
Where is KB article for Access to the path C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files? Siegfried Heintze ASP .Net 6 05-05-2007 05:10 AM
MSKB Article 299692 - How to Upload Files to a Web Server using ASP Brian M ASP General 5 02-20-2004 01:42 PM



Advertisments