Search for words in an association?

I have been playing around with associations to see if I can understand something about the database capabilities in Mathematica. I generated an example dataset consisting of names and email addresses as shown below.

zAssoc={<|"Name" -> "Janice Baker Cody", 
  "Email" -> "janxxx@sbcglobal.net"|>, <|"Name" -> "Jan Scott", 
  "Email" -> "Unpublished"|>, <|"Name" -> "Jim Barbar", 
  "Email" -> "jb@gmail.com"|>, <|"Name" -> "Jean Bates Williams", 
  "Email" -> "jbw123@att.net"|>, <|"Name" -> "John Black", 
  "Email" -> "john.black@sbcglobal.net"|>, <|"Name" -> "Bobby Chance",
   "Email" -> "bobchance@comcast.net"|>, <|"Name" -> "Bob Colt", 
  "Email" -> "unpublished"|>, <|"Name" -> "Jim Davis", 
  "Email" -> "jd55@att.net"|>, <|"Name" -> "Tom Davis", 
  "Email" -> "tdavis@aol.com"|>, <|"Name" -> "Tom Good", 
  "Email" -> "tgood@aol.com"|>, <|"Name" -> "Maryann Williams Bast", 
  "Email" -> "maryann@att.net"|>, <|"Name" -> "Mary Louise Franklin", 
  "Email" -> "mlf@gmail.com"|>, <|"Name" -> "Jimmie Ann Holt", 
  "Email" -> "jah@yahoo.com"|>, <|"Name" -> "Glenda McClaskey Brown", 
  "Email" -> "fcb3336@yahoo.com"|>, <|"Name" -> 
   "Donna Marshall Tartine", 
  "Email" -> "donnatart12@att.net"|>, <|"Name" -> 
   "Janice Moore Taylor", 
  "Email" -> "Janice@gmail.net"|>, <|"Name" -> 
   "Mary Kate Hepworth Donaldson", 
  "Email" -> "mkhd@swbell.net"|>, <|"Name" -> "Don Stevens", 
  "Email" -> "dsteve@gmail.com"|>}

I want to be able to enter either a person’s first or last name and find all records corresponding to the name. The following code does this, but it also finds records for persons whose partial name also matches for the desired name.

Do[selName = InputString["name to search for"];
 lenName = StringLength[selName];
 If[lenName == 0, Break[]];
 selRslt = 
  Query[Select[StringContainsQ[#Name, selName] == True &], {"Name", 
     "Email"}]@zAssoc;
 Print[Dataset[selRslt]], 5]

I was able to avoid this by splitting the name field up with the following code but it involved a rather convoluted calculation. My question is whether there is a more direct way of looking for specific words using Mathematica’s built-in database capabilities.

Do[selName = InputString["name to search for"];
 lenName = StringLength[selName];
 If[lenName == 0, Break[]];
 selRslt = 
  Query[Select[StringContainsQ[#Name, selName] == True &], {"Name", 
     "Email"}]@zAssoc;
 selNameString = Query[All, "Name"]@selRslt;
 separateWord = 
  Map[StringMatchQ[StringSplit[#], selName] &, selNameString];
 desiredNameLocs = 
  Flatten[Position[AnyTrue[#, TrueQ] & /@ separateWord, True]];
 Print[Dataset[selRslt[[desiredNameLocs]]]], 5]

You can try with StringSplit and MemberQ:

zDataset = Dataset[zAssoc];
zDataset[Select[MemberQ[StringSplit[#Name], "Tom"] &]]

I get the sense you are coming from a background in other programming languages. Immodestly, you might also want to look at this [ A primer on Association and Dataset ](Immodestly,%20you%20might%20also%20want%20to%20look%20at%20this%20 A primer on Association and Dataset %20for%20general%20advice%20on%20using%20Dataset.) for general advice on querying data in Mathematica.

[1]: Immodestly,%20you%20might%20also%20want%20to%20look%20at%20this%20 A primer on Association and Dataset %20for%20general%20advice%20on%20using%20Dataset.

Many thanks to Gianluca for a direct answer to my question and to Seth for the link to his tutorial on association and datasets. I had seen the tutorial by Seth and it, in fact, was what got me interested in what could be done in Mathematica relative to databases. I just had not absorbed all the information in his post.

Seth, you are correct in your sense that my background is in languages other than Mathematica. I first started programming in Fortran and then switched to Matlab after it was commercially available.