Hello guys, I'm in need of some thinking help.
I want to build an auto-complete text input to find cars, but I want it to search for Car Models and Car Manufactor too.
In example, if the user type 'For', the suggestions would be
'Ford - Car 1'
'Ford - Car 2'
'Some car that start with 'For''
If the user type 'H', the seggestions would be
'Honda - Civic'
'Hatch - Some hatch car'
'Some car that start with 'H''
In the database, there's 3 tables, Car, CarModel and CarManufactor. The Car table has the fields CarModelId and CarManufactorId, that are reference two the other tables.
I thoght in two options till now:
1. Search each field in each table and then join them toggether
2. Pre fill a table with all possibilites and them search only there using RegEx to make the best match.
Does anyone have better ideas or suggestions?
Thanks very much!