to use or not to use a database for an archivable and searchable document – PHP

  php

Q(Question):

hello mates,

my question is such: should i turn a 80 pages doc file into a database so
that:

– i can make it searchable through an online form
– it can be modified and every modification archives the previous version,
inside an "archive" table.

??

The document could be described like this: it is a series of articles
organised in 2 levels: sections and subsections.
The user should be able to modify/erase/add articles , subsections and
sections and still keep the original article inside an archive.

The search system should cover both the current version and the archives.

I get confused on how to organize the whole database system.
I figured out that maybe it would be better to generate html files out of
the database content (since it is not going to be changed everyday) and then
perform the search on these html files. Same for the archives. Every updates
generates a new set of html files containing the whole document.

what do you think ?

i need experimented advise here. please help !!

A(Answer):

Alexandre Plennevaux wrote:

hello mates,

my question is such: should i turn a 80 pages doc file into a database

The document could be described like this: it is a series of articles
organised in 2 levels: sections and subsections.
The user should be able to modify/erase/add articles , subsections and
sections and still keep the original article inside an archive.

Sounds like a wiki to me! IIRC there are PHP-based wikis available.
Matthias

A(Answer):

I would definitively use a database as it’s faster to search for something
in the database than open each html file then search on all the files on a
specific section of the code (strip html tags, etc.). Coding is also easier.
Just think if someone search for "javascript exemple" and you have some JS
also on your page but not in the news, you will have to make lot of
traitments that would be like a piece of cake in a database. This is like
digging a swimming pool with a spoon.

Savut

"Alexandre Plennevaux" <al*******@lab-au.com> wrote in message
news:40***********************@news.skynet.be…

hello mates,

my question is such: should i turn a 80 pages doc file into a database so
that:

– i can make it searchable through an online form
– it can be modified and every modification archives the previous version,
inside an "archive" table.

??

The document could be described like this: it is a series of articles
organised in 2 levels: sections and subsections.
The user should be able to modify/erase/add articles , subsections and
sections and still keep the original article inside an archive.

The search system should cover both the current version and the archives.

I get confused on how to organize the whole database system.
I figured out that maybe it would be better to generate html files out of
the database content (since it is not going to be changed everyday) and
then perform the search on these html files. Same for the archives. Every
updates generates a new set of html files containing the whole document.

what do you think ?

i need experimented advise here. please help !!

A(Answer):

thanks for your reply. I think i’m going for a mixed solution:

i will have a database holding the content. Everytime the admin modifies the
content, i will have the script generate new html files and update the
database with those files, so the search will look in the database and
return the html file(s) as links (much like google).
this will limit database access as it will not be updated everyday so…
my question is now how to implement the archival logic ?

alex
"Savut" <we***@hotmail.com> wrote in message
news:6R********************@news20.bellglobal.com. ..

I would definitively use a database as it’s faster to search for something
in the database than open each html file then search on all the files on a
specific section of the code (strip html tags, etc.). Coding is also
easier. Just think if someone search for "javascript exemple" and you have some JS
also on your page but not in the news, you will have to make lot of
traitments that would be like a piece of cake in a database. This is like
digging a swimming pool with a spoon.

Savut

"Alexandre Plennevaux" <al*******@lab-au.com> wrote in message
news:40***********************@news.skynet.be…

hello mates,

my question is such: should i turn a 80 pages doc file into a database
so that:

– i can make it searchable through an online form
– it can be modified and every modification archives the previous
version, inside an "archive" table.

??

The document could be described like this: it is a series of articles
organised in 2 levels: sections and subsections.
The user should be able to modify/erase/add articles , subsections and
sections and still keep the original article inside an archive.

The search system should cover both the current version and the
archives.
I get confused on how to organize the whole database system.
I figured out that maybe it would be better to generate html files out
of the database content (since it is not going to be changed everyday) and

then

perform the search on these html files. Same for the archives. Every

updates

generates a new set of html files containing the whole document.

what do you think ?

i need experimented advise here. please help !!

A(Answer):

why not use your solution, create static html page from the database, but
the search would still be done in the database then return the html page,
just like you said.

Savut

"Alexandre Plennevaux" <al*******@lab-au.com> wrote in message
news:40*********************@news.skynet.be…

thanks for your reply. I think i’m going for a mixed solution:

i will have a database holding the content. Everytime the admin modifies
the content, i will have the script generate new html files and update the
database with those files, so the search will look in the database and
return the html file(s) as links (much like google).
this will limit database access as it will not be updated everyday so…
my question is now how to implement the archival logic ?

alex
"Savut" <we***@hotmail.com> wrote in message
news:6R********************@news20.bellglobal.com. ..

I would definitively use a database as it’s faster to search for
something

in the database than open each html file then search on all the files on
a specific section of the code (strip html tags, etc.). Coding is also

easier.

Just think if someone search for "javascript exemple" and you have some
JS also on your page but not in the news, you will have to make lot of
traitments that would be like a piece of cake in a database. This is
like digging a swimming pool with a spoon.

Savut

"Alexandre Plennevaux" <al*******@lab-au.com> wrote in message
news:40***********************@news.skynet.be…

hello mates,

my question is such: should i turn a 80 pages doc file into a database so that:

– i can make it searchable through an online form
– it can be modified and every modification archives the previous version, inside an "archive" table.

??

The document could be described like this: it is a series of articles
organised in 2 levels: sections and subsections.
The user should be able to modify/erase/add articles , subsections and
sections and still keep the original article inside an archive.

The search system should cover both the current version and the archives.
I get confused on how to organize the whole database system.
I figured out that maybe it would be better to generate html files out of the database content (since it is not going to be changed everyday)

and then

perform the search on these html files. Same for the archives. Every

updates

generates a new set of html files containing the whole document.

what do you think ?

i need experimented advise here. please help !!

A(Answer):

Based on what you’ve said, I would say no. It doesn’t make sense to use a
database to do the job of a word-processor. Keep the Word file and use it to
generate a HTML version. Use Word’s versioning mechanism or simply create a
new copy of the .doc file everytime you make changes.

Uzytkownik "Alexandre Plennevaux" <al*******@lab-au.com> napisal w
wiadomosci news:40***********************@news.skynet.be…

hello mates,

my question is such: should i turn a 80 pages doc file into a database so
that:

– i can make it searchable through an online form
– it can be modified and every modification archives the previous version,
inside an "archive" table.

??

The document could be described like this: it is a series of articles
organised in 2 levels: sections and subsections.
The user should be able to modify/erase/add articles , subsections and
sections and still keep the original article inside an archive.

The search system should cover both the current version and the archives.

I get confused on how to organize the whole database system.
I figured out that maybe it would be better to generate html files out of
the database content (since it is not going to be changed everyday) and
then perform the search on these html files. Same for the archives. Every
updates generates a new set of html files containing the whole document.

what do you think ?

i need experimented advise here. please help !!

A(Answer):

He didn’t said it’s word format as I know

Savut

"Chung Leong" <ch***********@hotmail.com> wrote in message
news:fe********************@comcast.com…

Based on what you’ve said, I would say no. It doesn’t make sense to use a
database to do the job of a word-processor. Keep the Word file and use it
to generate a HTML version. Use Word’s versioning mechanism or simply create
a new copy of the .doc file everytime you make changes.

Uzytkownik "Alexandre Plennevaux" <al*******@lab-au.com> napisal w
wiadomosci news:40***********************@news.skynet.be…

hello mates,

my question is such: should i turn a 80 pages doc file into a database
so that:

– i can make it searchable through an online form
– it can be modified and every modification archives the previous
version, inside an "archive" table.

??

The document could be described like this: it is a series of articles
organised in 2 levels: sections and subsections.
The user should be able to modify/erase/add articles , subsections and
sections and still keep the original article inside an archive.

The search system should cover both the current version and the
archives.
I get confused on how to organize the whole database system.
I figured out that maybe it would be better to generate html files out
of the database content (since it is not going to be changed everyday) and

then

perform the search on these html files. Same for the archives. Every

updates

generates a new set of html files containing the whole document.

what do you think ?

i need experimented advise here. please help !!

LEAVE A COMMENT