I've got a query please that any comments would be greatly appreciated.
I have a program done already which is a hair salon booking appointment ConsoleApp. The ConsoleApp has Customer details, Staff details and Booking details. These infos are saved in StreamWriter Text File.
So, what I need now is to add a Search to the ConsoleApp so that I can use Booking ID to Search a Customers appointment date the Customer booked already.
if you need to search the data a lot after a query, store a pointer (will be like a database index) to the data in an unordered map by booking id.
if its a one of a kind, don't search, that is what the database is supposed to be good at. Inject a where clause into that query and re-run it for only the ID you needed.
if there isnt actually a database (are you calling your text file a database?!) the first answer will still work, but the where clause won't -- you will just have to make a decision based off the requirements....
System.Collections.Generic.Dictionary<TKey, TValue> and System.Collections.Hashtable
appear to be C# for our c++ maps.
it is not uncommon to have multiple tables for one set of data so you can search on a number of things efficiently.
this is not the best place for c# help -- we pretty much stick to C and C++. You can ask, but not everyone here even knows c#.. I have done maybe 3 very small projects in it.