Re: Data architecture question
| From: | Alex Black | Date: | Wed, 13 Dec 2000 20:55:26 +0000 |
| Subject: | Re: Data architecture question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30166@lists.php.net to get a copy of this message | ||
_if_ any only if you don't need to check anything else against the database
(i.e. is this person logged in, etc)
then, I recommend using PHP only on an administration site, and storing all
of your content in a database.
then, you can do nightly (or more often) chrons of a PHP script in cgi-mode,
and have it rsynch the entire hierarchy of new files to the server.
that'll be rippin' fast.
_a
--
Alex Black, Head Monkey
enigma@turingstudio.com
The Turing Studio, Inc.
http://www.turingstudio.com
vox+510.666.0074
fax+510.666.0093
Saul Zaentz Film Center
2600 Tenth St Suite 433
Berkeley, CA 94710-2522
> From: mstearne@entermix.com (Michael Stearne)
> Newsgroups: php.general
> Date: 13 Dec 2000 09:15:35 -0800
> Subject: Re: [PHP] Data architecture question
>
>
> On Wednesday, December 13, 2000, at 11:38 AM, Ashley T. Howes PhD wrote:
>
>> This is not a specific PHP question, but more a data architecture
>> query. However I guess several of you have considered this more than
>> once.
>>
>> In developing a news site with many articles on it, what is best
>> practise for storing and administering the content? A specific
>> problem I have been examining is that each database field can store
>> only a finite number of characters. If the body of an article is
>> larger than this, what is the best approach for storage?
>
> Most databases shouldn't have any problem storing a story that is even several
> pages, in mySQL the field type is TEXT. You could store the story is an
> external file, but I am more inclined to store the text of the file in the
> database. This was you can still separate content from the layout of your
> site but having all the text of all the stories in one database might prove to
> be easier to administer.
>
>> solution might be to save the content in a text file with a unique
>> filename on the hd - but this must lead to slow queries as the data
>> is external to the db.
>>
> If you do go with external files, I don't think this will be very slow, what
> might be slow is the large query results that are returned from the database
> field that may contain a story with 10,000 words. This is the case where you
> can get into making static HTML pages from one query of the database, to save
> the load on the database.
>
>> What about specifying formatting of the content? Is the best
>> approach to place formatting tags in the copy which are interrupted
>> on the fly? How about images associated with the copy, should these
>> be saved to unique filename on hd, or is there a better approach?
>
> The administration sites that I have created and seen have had the journalist
> insert some basic HTML themselves if necessary like <B> <I> <A HREF>, etc.
> Coming up with you own shorthand HTML language and then parser might be
> overkill and a waste of your time. They can always use a WYSIWYG tool like
> Dreamweaver to do their story and then paste in the HTML source.
>
> The graphic images for the story should be stored in the filesystem and
> referenced to in the database. Like: image1='story378383image1.jpg' which
> when printed in the script will look like: <IMG
> SRC="/where/my/images/are/<?echo $r->image1?>">
>
> Michael
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>