473,406 Members | 2,336 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Database Search technique

realin
254 100+
hiya all,

i am going to develop a big bulky search engine for one of my client. I want your suggestions to pour into before i start.

The search would be only through database and not pages. The kind of database is local. The nature of the data is more like addresses.

So shall i put the whole address(cityname,pincode,country) into a single fulltext column or shall i consider putting them into multiple columns. Well i want to go for second option cause i would need geographical sorting.

Is tehre some specific technique/pattern i need to follow or the fulltext searching would do it ?

Thanks in advance :0
Jun 12 '08 #1
4 1854
coolsti
310 100+
If you ask this question about whether all your data should be in one full text column or split up in several columns, then I would suggest you spend some time reading a book on basic database design. It will help you quite a bit, I did this at the time I started working with databases, and it gave me the insight to do decent design from the beginning.

There are many reasons why you would rather have separate columns for separate data types. One is the efficiency of searches, if for example one was interested in searching only by one "attribute" but not the others, or if one wants to search on two or three of them using different search criteria. Sorting is another reason to have things in separate columns. I would say that in just about most cases, you would opt for separate columns, and not combined text fields.

But do some basic database design reading, and learn a little about the concept of normalizations and basic design principles, believe me it will help.
Jun 12 '08 #2
realin
254 100+
If you ask this question about whether all your data should be in one full text column or split up in several columns, then I would suggest you spend some time reading a book on basic database design. It will help you quite a bit, I did this at the time I started working with databases, and it gave me the insight to do decent design from the beginning.

There are many reasons why you would rather have separate columns for separate data types. One is the efficiency of searches, if for example one was interested in searching only by one "attribute" but not the others, or if one wants to search on two or three of them using different search criteria. Sorting is another reason to have things in separate columns. I would say that in just about most cases, you would opt for separate columns, and not combined text fields.

But do some basic database design reading, and learn a little about the concept of normalizations and basic design principles, believe me it will help.

thanks for your inputs mate ..
will try searching more on that ..
but i still am wondering about the searching options ?
Jun 13 '08 #3
coolsti
310 100+
I am wondering if your post should not better be in a database forum rather than PHP? Or are you specifically asking how to implement a search of a database in a PHP script?

From the database side, the searching is performed by the database using the appropriate SELECT queries. From the PHP point of view, you would gather input from the user on what is to be searched for, how many items are to be shown (e.g. 25 per page), connect to the database, build the query, perform it, get the results and show it somehow.

What is it you need to know?
Jun 13 '08 #4
realin
254 100+
I am wondering if your post should not better be in a database forum rather than PHP? Or are you specifically asking how to implement a search of a database in a PHP script?

From the database side, the searching is performed by the database using the appropriate SELECT queries. From the PHP point of view, you would gather input from the user on what is to be searched for, how many items are to be shown (e.g. 25 per page), connect to the database, build the query, perform it, get the results and show it somehow.

What is it you need to know?
i just wanted the input of the programmers in here upon searching technique. Like is there a faster way to do after i fire select queries. I mean doing it in conventional manner (i.e. select * from tablename where column like %keyword%) would take up lotsa memory and of course time.

Is there something using XML ?
was wondeirng ..

thanks for your inputs :)
Jun 13 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: R. Rajesh Jeba Anbiah | last post by:
Q: Is PHP search engine friendly? Q: Will search engine spiders crawl my PHP pages? A: Spiders should crawl anything provided they're accessible. Since, nowadays most of the websites are been...
1
by: BillK | last post by:
Hi - I am looking for a solution to a clients requirement. They want to distribute a database of info on CD, which user can search on selected fields and results will be displayed. The data and...
10
by: Case Nelson | last post by:
Hi there I've just been playing around with some python code and I've got a fun little optimization problem I could use some help with. Basically, the program needs to take in a random list of no...
67
by: Sandy.Pittendrigh | last post by:
Here's a question I don't know the answer to: I have a friend who makes very expensive, hand-made bamboo flyrods. He's widely recognized (in the fishing industry) as one of the 3-5 'best' rod...
28
by: joshc | last post by:
If I have an array of data that I know to be sorted in increasing order, and the array is less than 50 elements, and I want to find the first element greater than a certain value, is a simple...
0
by: Guoqi Zheng | last post by:
dear sir, I am a asp/asp.net+Ms Sql programmer, I am investigating a insite search engine, may be used to index our partner's site as well. Does some one know about the technique I can use to...
10
by: Paul H | last post by:
I am trying to get the spec for a database. The trouble is the client frequently blurts out industry jargon, speaks insanely quickly and is easily sidetracked. They are currently using around 30...
3
by: Sunfire | last post by:
I need to use a custom database for all of the user membership and rolls. How do you do this?
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.