Re: SQLite just awarded open source award
- Posted by Chris Burch <chriscrylex at aol.com> Aug 20, 2005
- 497 views
Tone Škoda wrote: > > SQL LIKE operator can be used for pattern match. Now I'm having trouble > finding out > which (free) databases use this keyword efficiently for left or doubly > truncated wildcards: > %oria: Euphoria, Doria > > I'm thinking that you have to know in what structure database stores data to > be able > to use it efficiently. Is there documentation for that? > Hi SQLite is free, uses LIKE very efficiently (as does euSQL!) There are tons of SQL tutorials on the web - look at the bottom link below, or google an SQL tutorial. (Is google a verb now?) in SQLite, if you want to find the structure of a database use the master keyword eg SELECT * FROM sqlite_master will return a sequence containg all the tables, all the fields, and all the field types of each of the fields so, for your above request, you would have to know what fields you wanted to look through, assuming it was the field 'strange_words' in the table 'stuff', then you would do SELECT * FROM stuff WHERE strange_words LIKE '%oria' would select all the fields, or SELECT strange_words FROM stuff WHERE strange_words LIKE '%oria' of course these words would have to end in oria - if you wanted to look for oria withinm the string, then SELECT strange_words FROM stuff WHERE strange_words LIKE '%oria%' As far as search efficiency goes, SQLite uses a btrieve search tree (I have no idea what that means, but it sounds good), and there are benchmarks on the site ( www.sqlite.org ) Chris http://members.aol.com/chriscrylex/euphoria.htm http://uboard.proboards32.com/ http://members.aol.com/chriscrylex/EUSQLite/eusql.html