I have a system with the concept of addresses (as in postal addresses). We have an Address table with fields Address1-4, City, PostCode.
I am trying to figure out the best way to store this Address data so that it can be queried easily in the UI. Users don't generally appreciate that there are separate fields (except for perhaps Post Code) so asking them to put the right string in 5 search fields doesn't work. I feel it needs to be a single search field which will try and match against part of the address.
For example
Address1: Flat 23
Address2: Big Towers
Address3: 1 Baker Street
Address4: (Blank)
City: London
PostCode: W1U 6AA
So for example if wanted to find "Flat 23 in Big Towers" I might like to type "23 Big Towers" or "Big Towers 23" into a query box and expect it to find the above. But because the fields are separate this is difficult to achieve.
The app is completely proprietary so making changes to how the address is stored or storing it in multiple ways is perfectly feasible. The app is C# UI and Java middle-tier.
Does anyone have any suggestions about how to store the Address and structure a search UI + query to make this straightforward from a user's points of view?
EDIT: Added an example