WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Database Discussion Forum This is the place to find help resolving those nagging questions you have about implementing and using all kinds of databases. Need help writing a query? Need an opinion on Oracle? Post here!

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-25-2004, 11:36 AM
WebProWorld Member
 

Join Date: Aug 2003
Location: UK
Posts: 77
poab RepRank 0
Default Fastest search of database

Hi,

I have an access database with around 300 products. Each product has around 50 or so characteristics that differenciate it from all the others. I'm searching it with ASP using vbscript.

What I'd like to know is, am I better to have a different column for each characteristic with a simple yes/no, or would it be faster to put all related characteristics in a single olumn and use vbscripts InStr() method to find what's there?

At the moment I'm using the first method, but that's like 50 odd columns which must be a bad idea. On the other hand, using the InStr methed means that some of the columns are going to be really large.

What you you guys/gals think?

cheers.
Reply With Quote
  #2 (permalink)  
Old 03-25-2004, 05:03 PM
WebProWorld Pro
 

Join Date: Mar 2004
Location: Pittsburgh, PA, USA
Posts: 114
ChrisRC RepRank 0
Default

I've always found that the best way to find out is to actually test it. Run it both ways and see which is faster.

Are you searching on the characteristics to get the products, or the product to get the characteristics?

My inclination would be to have a seperate characteristics table with 1 record per item per characteristic. IOW, if I wanted to find stainless steel widgets: "SELECT widget FROM items INNER JOIN characterics ON items.id=characteristics.id WHERE characteristics.spec=stainless;"

Also, and this may not be news to you but I felt the need to point it out in case it is: Access really isn't appropriate for a production website. It's a great RAD front end, but the db itself wasn't designed for large scale concurrent access. MySQL is free* and runs great under Windows.

Chris
crcdesign.net
Reply With Quote
  #3 (permalink)  
Old 03-26-2004, 07:01 AM
WebProWorld Member
 

Join Date: Aug 2003
Location: UK
Posts: 77
poab RepRank 0
Default

Hi,

thanks for the advice. As for access, I know it's a bad idea, but I've not been given the option.

cheers.
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum
Tags: , ,



Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0