Originally posted by Jim Yingst:
I assumed AND.
"records where the name and/or location fields exactly match values specified by the user"
I think that the use of "and/or" here is just a nod to the fact that either name or location could be left blank, and so might need to search for
(records where name matches)
OR (records where location matches)
OR (record where name AND location match)
This interpretation was influenced by the description of the find() method, which implicitly ANDs all criteria specified (not left blank). It's certainly possible to add an OR button - but I don't think it's necessary. IMO of course.
Originally posted by Jim Yingst:
I assumed AND.
"records where the name and/or location fields exactly match values specified by the user"
I think that the use of "and/or" here is just a nod to the fact that either name or location could be left blank, and so might need to search for
(records where name matches)
OR (records where location matches)
OR (record where name AND location match)
This interpretation was influenced by the description of the find() method, which implicitly ANDs all criteria specified (not left blank). It's certainly possible to add an OR button - but I don't think it's necessary. IMO of course.
Originally posted by Jim Yingst:
Oh, you're making the search case insensitive? I had decided not to, but I suppose it could be justified the same way I justify returning both "Fred" and "Freddy".. My feeling is case insensitivity would be preferable in the real world (or better yet, a checkbox to choose whether to use it or not), but I'm not sure it's such a good idea here. I may yet flip-flop some more before I turn in my assignment.
FileChannel - yeah, that's what I use. Pretty simple really - it's just unfamiliar to most of us initially.
Originally posted by Jim Yingst:
Right, I was talking about server mode vs. client mode - forgot to mention standalone mode.
Originally posted by Jim Yingst:
Yes, I think host and port is probably what is meant by "location". You could allow them to specify file path too, but it complicates things, and requires them to ba able to browse the server's file structure, which is probably none of their business. Simpler to let the person who starts the client choose what server they connect to (host and port), and let the person who starts the server choose which file (path) they want to access.
Originally posted by Mark Spritzler:
In this thread Zhi's instructions say that you must allow the user to select the database location, which would mean that that same gui for the properties should have an area for them to specify the location of the database file. Now you can have a "browse" button next to it and use the JFileChooser class to allow them to select it.
Good Luck
Mark
Originally posted by Perry Board:
I think RMI is much simpler than sockets. You can call methods on a remote object just like it were a local object. With sockets, you'll need to do all the hard work yourself of inventing a protocol for your messages, then interpreting it at either end and doing the appropriate thing.
Try the RMI tutorial on the Sun site and you'll see how easy it is.
If you are set on sockets, why not just pick an arbitrary high port number to use and don't change it unless the user specifically says to use a special port.
[ May 08, 2003: Message edited by: Perry Board ]