Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old December 11th, 2002, 05:25 AM
buttie buttie is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 47 buttie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 55 m 43 sec
Reputation Power: 6
searching more than one table

Hi

I am looking for some general pointers about how to go about searching more than one table, the tables are currently unrelated. The search is a general site based search, so a user can can find an item in any section of the site.

The site is news based and as such the tables are quite content heavy. I am using mysql fulltext at the moment, but I can not get it to work on more than one table, so my thoughts were to look at the way my tables were related.

Should there be a general table_list table that contains all other tables, relating them under this table? this is where my concepts fall down, as how does this aid in searching on the specific fields in the other tables?

Any help much appreciated.

Thanks

Buttie

Reply With Quote
  #2  
Old December 24th, 2002, 08:45 AM
Wingman Wingman is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Bavaria, Germany
Posts: 140 Wingman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 40 m 41 sec
Reputation Power: 6
If your tables aren't connected in some way you run into a problem :-). You can join them with a cross join (e.g. "select * from table1, table2") but then you get ALL records from table1 combined with ALL records from table2.

You could use the metadata (which should be available on every database since this is one of the main rules of a database, each metadata is defined in tables (so your database should already have a table of tables in your database (e.g. sysobjects on MSSQL))) but there you still have the problem how to join your indiviual records.

On each project i worked on, when it comes down to searching there was always a relation between the different tables where we could join them. Other way (hack ;-)) would be to don't let the user search in a such generic way, but just let him choose which section he wants to search...

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > searching more than one table


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway