Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > [ot] why SQL forum?

Reply
Thread Tools

[ot] why SQL forum?

 
 
Zhang Weiwu\(familyname first\)
Guest
Posts: n/a
 
      07-23-2003
Hello. This is an another newbie question. And it is a bit off-topic. I
post it here and I don't know where is the proper place to post it

I just wonder why now all the forum code writers love to put the article
text and other information in to SQL or other types of database, instead of
storing them directly into files, and let the OS's file system to optimize
reading and writing, while storing articles seems have many benefit then
using a database.

A forum messages is suitable for a file, especially when it contain HTML
data, it is suitable for a HTML file.

a. with "forward" and "backward" meta data which is already defined as HTML
standard ("forward" and "backward" article references also show clearer
relationship to the search engines), the article thread information is
clear, and can be somewhat forum-system independent.

b. it makes export and import very much easier. Say a company wish to
publish a disco of all the tech discussion happened last year, the
administrator simple put all things in the forum folder to the disco and it
is okay.

c. It makes dynamic pages relatively static. A file based forum don't
re-generate the article HTML page each time when someone asks for it, and
dynamic pages like jsp are needed only when composing and editing message
posts, saving lots of CPU time.

d. Another benefit of static pages are that it makes search engine easier to
index. Many search engine don't store dynamic pages much, but they are well
designed to index static pages.

e. Many web servers are highly optimized for static page. Normally static
pages are much faster.

f. It could be easier to back up things. Using SQL your need to back up all
stuff with capable knowledge.

So why databased forums are so popular today?

 
Reply With Quote
 
 
 
 
Gerbrand van Dieijen
Guest
Posts: n/a
 
      07-23-2003
On Wed, 23 Jul 2003 22:58:45 +0800, Zhang Weiwu\(familyname first\) wrote:
>Hello. This is an another newbie question. And it is a bit off-topic. I
>post it here and I don't know where is the proper place to post it
>
>I just wonder why now all the forum code writers love to put the article
>text and other information in to SQL or other types of database, instead of
>storing them directly into files, and let the OS's file system to optimize
>reading and writing, while storing articles seems have many benefit then
>using a database.
>


Helllo,
with all respect (because I might had the same idea when I was less
experienced in it), but all points you state not true because theire based
on false assumptions or inlogical.

First, a filesystem is a database too. So from the perfomance point of
view that makes no difference. A fast database will be just as fast or
faster then a filesystem depending on where you use it for. Many advanced
database bypass the filesystem (the operating system) and write directly
to disk, but for most applications computers/os/harddisks are more than
fast enough that it is not nesseary.

Second, a database is much more flexible then a filesystem. SQL is an open
standard, just as JDBC, ODBC, so you can easily switch database or backup
or transfer date without much trouble.. Yes, many php applications are
tight too the sligly inferiour MySQL, but Java databases (and asp for that
matter) are more or less database-independent.
With a database you can easily query your data, for example 'get all
postings from user a', or 'get postings with subject Whatever and the word
Certainly and True', or 'delete this and this posting' with a filesystem
this is much harder and you would
have to program lots of things that otherwise would be done by the
databasedriver.

Third, dynamic pages can be cached too when a 'time to live' is set, the
page will be cached by a proxyserver or browser and won't be reloaded each
time. It's even possible too set a proxyserver on the server-side that
will transparantly cache requests. However, this is only needed on very
high load websites.

Hoping this is clear,
Greetings,

--
Gerbrand van Dieijen

WWW: http://twisted.warande.net
ICQ: 19345450



 
Reply With Quote
 
 
 
 
Marco Schmidt
Guest
Posts: n/a
 
      07-25-2003
Zhang Weiwu(familyname first):

>Hello. This is an another newbie question. And it is a bit off-topic. I
>post it here and I don't know where is the proper place to post it


Probably comp.databases or comp.lang.java.databases.

>I just wonder why now all the forum code writers love to put the article
>text and other information in to SQL or other types of database, instead of
>storing them directly into files, and let the OS's file system to optimize
>reading and writing, while storing articles seems have many benefit then
>using a database.


Why do you think that databases are less optimized for retrieving
information than file systems? Some database systems don't use file
systems at all but do raw I/O on partitions themselves.

>A forum messages is suitable for a file, especially when it contain HTML
>data, it is suitable for a HTML file.


Sure a message can be put in a file, but it can just as well be put
into a table column. Whether the content is plain text or HTML doesn't
make any difference (that I can see).

>a. with "forward" and "backward" meta data which is already defined as HTML
>standard ("forward" and "backward" article references also show clearer
>relationship to the search engines), the article thread information is
>clear, and can be somewhat forum-system independent.


The generated HTML from a database can contain <link> elements with
Prev, Next, Last, First etc. just as well.

>b. it makes export and import very much easier. Say a company wish to
>publish a disco of all the tech discussion happened last year, the
>administrator simple put all things in the forum folder to the disco and it
>is okay.


Why is that discussion available as HTML already? You can just as well
take the source data and put it in a database.

>c. It makes dynamic pages relatively static. A file based forum don't
>re-generate the article HTML page each time when someone asks for it, and
>dynamic pages like jsp are needed only when composing and editing message
>posts, saving lots of CPU time.


Generated pages can be cached.

>d. Another benefit of static pages are that it makes search engine easier to
>index. Many search engine don't store dynamic pages much, but they are well
>designed to index static pages.


Most databases come with built-in full text search. You specify which
columns to do full-text indexing on, and then all you have to do is
query the database. Adapting some search engine library / program is
harder.

>e. Many web servers are highly optimized for static page. Normally static
>pages are much faster.


The result of database queries can be cached as well.

>f. It could be easier to back up things. Using SQL your need to back up all
>stuff with capable knowledge.


A backup is relatively simple, databases usually come with some tool
that makes that quite easy.

Above I often stated that databases can be used "just as well". That
by itself isn't an advantage, obviously. Here are some reasons:

- Queries can be easily done with SQL. With files, you had to do a lot
of programming to accomplish the same thing. Basically you'd be
programming all that functionality that is already built into
databases.

- Many people know SQL and administrating databases. With a
file-system-based solution, nobody except you and your team had an
overview. Maintenance for others would be complex, and expensive for
those who own the place.

- SQL (or more general, RDBMSs) are old, proven technology. A
self-made solution using the file system is not. People have put
decades of research & development into existing databases. It's
unlikely that you can come up with something better in the short term.

- On many web servers some sort of database is installed for you to
use. Unless you control the server it is unlikely that you can run a
self-made program.

- Relational DBs are not natural for tree-like structures like
discussion forum message threads, but there is the nested set model
for that purpose (when insert is rare and select often):
<http://www.intelligententerprise.com/001020/celko.shtml>.

- There are ready-to-use solutions for web forums. Why start from
scratch (except maybe for the purpose of learning)?

Regards,
Marco
--
Please reply in the newsgroup, not by email!
Java programming tips: http://jiu.sourceforge.net/javatips.html
Other Java pages: http://www.geocities.com/marcoschmidt.geo/java.html
 
Reply With Quote
 
Sudsy
Guest
Posts: n/a
 
      07-26-2003
Marco Schmidt wrote:
<snip>
> - SQL (or more general, RDBMSs) are old, proven technology. A
> self-made solution using the file system is not. People have put
> decades of research & development into existing databases. It's
> unlikely that you can come up with something better in the short term.

<snip>

Sorry, Marco, but you provided an irresistable target. What about
heirarchical database management systems like IMS which were on
the market and mature well before the advent of relational DBMSs?
Anyone for DL/1?
Young turks think that DOM is new? Hah! Check out some of the
calls like GetNextWithinParent, GetNextChild, etc. and tell me
that it hasn't all been done before.
Granted, it's more elegantly available in Java, a fact which
hasn't been lost on Big Blue which makes it possible to access
IMS databases from Java.
Just keep in mind that a lot of what some consider to be "new"
has been around, in one form or another, for close to half a
century.
Makes you go "hmmmm", eh?

 
Reply With Quote
 
Lee Fesperman
Guest
Posts: n/a
 
      07-26-2003
Sudsy wrote:
>
> Marco Schmidt wrote:
> <snip>
> > - SQL (or more general, RDBMSs) are old, proven technology. A
> > self-made solution using the file system is not. People have put
> > decades of research & development into existing databases. It's
> > unlikely that you can come up with something better in the short term.

> <snip>
>
> Sorry, Marco, but you provided an irresistable target. What about
> heirarchical database management systems like IMS which were on
> the market and mature well before the advent of relational DBMSs?


The keyword here is 'proven'. Hierarchical (and Network) data model are disproved
technologies, that is, they have been proven to be inflexible, fragile and overly
complex. They are not mainstream technologies.

> Anyone for DL/1?
> Young turks think that DOM is new? Hah! Check out some of the
> calls like GetNextWithinParent, GetNextChild, etc. and tell me
> that it hasn't all been done before.
> Granted, it's more elegantly available in Java, a fact which
> hasn't been lost on Big Blue which makes it possible to access
> IMS databases from Java.
> Just keep in mind that a lot of what some consider to be "new"
> has been around, in one form or another, for close to half a
> century.


I realize that XML seems to be bringing the Hierarchical data model back into favor. The
difficulty is that they have solved none of the well-known problems with that data model
and have added additional complexity on top.

> Makes you go "hmmmm", eh?


Makes me go "hmmm" ... where did this guy learn database concepts?

--
Lee Fesperman, FirstSQL, Inc. (http://www.firstsql.com)
================================================== ============
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS (http://www.firstsql.com)
 
Reply With Quote
 
Sudsy
Guest
Posts: n/a
 
      07-26-2003
Lee Fesperman wrote:
<snip>
> The keyword here is 'proven'. Hierarchical (and Network) data model are disproved
> technologies, that is, they have been proven to be inflexible, fragile and overly
> complex. They are not mainstream technologies.

<snip>
> I realize that XML seems to be bringing the Hierarchical data model back into favor. The
> difficulty is that they have solved none of the well-known problems with that data model
> and have added additional complexity on top.
>
>
>>Makes you go "hmmmm", eh?

>
>
> Makes me go "hmmm" ... where did this guy learn database concepts?
>


That was precisely my point: navigating through a DOM tree is not that
different from navigation in IMS. IOW there's nothing really new under
the sun here.
As to your query ("where did this guy learn database concepts?"),
could you elucidate? Granted, I've only been using heirarchical
and relational DBMSs for a couple of decades...

 
Reply With Quote
 
Lee Fesperman
Guest
Posts: n/a
 
      07-28-2003
Sudsy wrote:
>
> Lee Fesperman wrote:
> <snip>
> > The keyword here is 'proven'. Hierarchical (and Network) data model are disproved
> > technologies, that is, they have been proven to be inflexible, fragile and overly
> > complex. They are not mainstream technologies.

> <snip>
> > I realize that XML seems to be bringing the Hierarchical data model back into favor. The
> > difficulty is that they have solved none of the well-known problems with that data model
> > and have added additional complexity on top.
> >
> >
> >>Makes you go "hmmmm", eh?

> >
> >
> > Makes me go "hmmm" ... where did this guy learn database concepts?
> >

>
> That was precisely my point: navigating through a DOM tree is not that
> different from navigation in IMS. IOW there's nothing really new under
> the sun here.
> As to your query ("where did this guy learn database concepts?"),
> could you elucidate? Granted, I've only been using heirarchical
> and relational DBMSs for a couple of decades...


If that is true, you certainly are confused. Marco recommended RDBMSs as old, proven and
well researched. You recommended hierarchical, a data model that is flawed, shown to be
not worth further research and largely discarded. Perhaps, you also want to recommend
ISAM, Inverted Files, Network Data Model, dBASE, Pick, ... from the backwaters of
technology.

--
Lee Fesperman, FirstSQL, Inc. (http://www.firstsql.com)
================================================== ============
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS (http://www.firstsql.com)
 
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
SQL Reference, SQL Queries, SQL help ecoolone ASP .Net 0 01-03-2008 10:58 AM
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
Cisco 2611 and Cisco 1721 : Why , why , why ????? sam@nospam.org Cisco 10 05-01-2005 08:49 AM
Why Why Why You HAVE NO IDEA MCSE 31 04-24-2004 06:40 PM



Advertisments