When dealing with the first name and last name, can we use something other than a trigger or is that the only way to do it to deal with names without first names?
You can do it at application level. Check user input using your Java program before calling JDBC.
Referencing environment variables in command line.
When using bash on cygwin, we should follow the linux way of specifying a environment variable like this: