D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Databases part 3

 

Neil Winchurst wrote:
> 
> However, an appeal to all you database experts out there. One of the
> most important and useful tools for a database is the search. No, not a
> query, a search. 

SQL relational databases have a few basic actions they typically perform
on data, "INSERT", "UPDATE", "DELETE", "SELECT" (some do "INSERT OR
UPDATE" depending if the record exists which is sensible since it is a
very common use case).

Any sort of search will map to a select query (since it isn't an INSERT,
UPDATE or DELETE).

Use of wildcards, would be a "LIKE" clause in a search.

        select * from tablename where ref_code like '%AB21%';

Use of "*" and "?" is a user interface thing.

ANSI SQL defined "%" and "_" as wildcards ( "*" and "?" were Microsoft
deviating from the standard for no obvious purpose).

How precisely is your search different from a query?

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html