At 06:48 AM 11/10/00 -0700, you wrote:
><snip>
>
>I am looking for the bast practices on the following questions:
>
>1) Is it best to have 1 large database with many tables or vise versa.


This is a data modeling question and the answer, of course, is maybe.  For 
a good quick-reference on data modeling, check out Tim McLellan's Data 
Modeling article at http://www.islandnet.com/~tmc/html/articles/datamodl.htm

For a small sight, and if you don't want to learn the bases, at the very 
minimum, keep in mind that redundant data is typically not a good 
thing.  Therefore if you have tables that contain the same data, it most 
likely can be broken into a related table.  A core example of bad data 
modeling is a shoe store that has a products table containing colors.  The 
field names might go something like: shoe_id(unq), shoe_name(varchr), 
color_blue(yn), color_red(yn), color_black(yn), etc.  Rather than having a 
new field for every color in the store (or color wheel), create a table for 
colors.  In this table, reference the product table key id field 
(shoe_id).  eg: color_id(unq), shoe_id(int), color_name(varchr).  In taking 
this step, you've eliminated the need for having the many fields specifying 
the different shoe colors in the product table.

This is just one example, a little research into different methodologies 
will go a very long way when it comes to even the most rudimentary data 
modeling.  Along those lines, check out http://www.rational.com for 
strongly supported methodologies such as UML and RUP.

>2) Is it best to set  queries in the application.cfm or in the page it =
>self, knowing this is a reoccurring query.

It will almost always be better to have your global query in a global 
application file which is manually included in each of your pages.  In 
doing so, when you *do* have a page(s) which do not require the query to be 
run, you can choose not to have it run, by not including the global 
page.  For additional information regarding this type of methodology check 
out http://www.fusebox.org  FuseBox is the closest uniform method in which 
CF can come close to achieving OOP utilizing application-wide behavior 
modules (templates).


>Thank you for your time.
>
>Dave Clay
>Internet Facilitator
>Trus Joist, A Weyerhaeuser Business
>5995 Greenwood Plaza Blvd, Suite 100
>Greenwood Village, CO 80111
>303.770.8506
<snip>

Hope that helps somewhat.

-Andy

Andy Goodson
Ciber Consultant
[EMAIL PROTECTED]


------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to