Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Location
    Sinapore
    Posts
    187

    Unanswered: store data in database or script?

    Hi,

    I want to store html tags that will be used to replace tags in a message retrieved from a database e.g. &lt;b&gt; with <b>. I have about over 100 of these tags and I'm wondering where is the best place to store them.

    I'm for storing them in a script (e.g. in a python list or dictionary or a Perl array) for the following reasons:

    1) Saves a call to the database

    2) Easier to edit because the script is a textfile

    3) Easier to add too for the same reason as (2)

    What are your thoughts on the above?

    Looking forward to hearing from you.

    Many thanks in advance

  2. #2
    Join Date
    Oct 2002
    Location
    Baghdad, Iraq
    Posts
    697
    It's not a matter of pros and cons. It's a matter of design.

    If you need to be sure that every app sees the same data, it needs to go in the database.

    If, on the other hand, this information is peculiar to the webserver side of your system, it shouldn't go in the database. This seems to be part of the presentation stage of your system, that is, it's not part of your business logic.

  3. #3
    Join Date
    Nov 2003
    Location
    Sinapore
    Posts
    187
    Thanks, so08y

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •