If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > store data in database or script?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-16-06, 00:33
pearl2 pearl2 is offline
Registered User
 
Join Date: Nov 2003
Location: Sinapore
Posts: 187
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
Reply With Quote
  #2 (permalink)  
Old 10-21-06, 14:42
sco08y sco08y is offline
Registered User
 
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.
Reply With Quote
  #3 (permalink)  
Old 10-26-06, 09:54
pearl2 pearl2 is offline
Registered User
 
Join Date: Nov 2003
Location: Sinapore
Posts: 187
Thanks, so08y
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On