View Single Post
Old 04-15-2004, 11:36 AM   #12 (permalink)
Yakk
Wehret Den Anfängen!
 
Location: Ontario, Canada
If you want a "fast" solution, try backreferences.

Ie, in the 6648-84U entry there is a reference to 6648-8% and all other wildcard entries that match it.

Keep a table of all "wildcard" entries in the db, like 6648-8%.

If someone enters something not in the DB, you can either decide you 'should' fail, or you can decide to do a search only through the "wildcard" entries.

The second use of the "wildcard"-only table is when you add a new normal entry to the DB. You'll have to check it against all existing "wildcard" entries and insert the correct backreferences.

When you add a "wildcard" entry, you can simply search for it, and insert the required backreferences.

This would allow for "wildcard" entries like
66%-8%U
which none of the other proposals deal with reasonably.

(I assume you know how to have an arbitrary number of backreferences in a db: use a linked list)
__________________
Last edited by JHVH : 10-29-4004 BC at 09:00 PM. Reason: Time for a rest.
Yakk is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62