Forums Register Login

location of database

+Pie Number of slices to send: Send
While reviewing the instructions, I want to make sure I understand this requirement:


the program must allow the user to specify the location of the database, and it must also accept an indication that a local database is to be used


I interpret this as meaning the user can specify the DIRECTORY in which the dtabase file lives. So I made the directory in which the database file lives a property that can be administered by the user. The name of the database file is hard-coded to the name of the database file given with the initial instructions. Am I correct in interpreting "location of the database" as "directory where the database file is"?
For the second part of the requirement, I'm assuming this "indication that a local database is to be used" is satisfied by the much-discussed "mode" flag. If the "mode" flag is set to "alone" then a local database is used (taken from the directory specified in the properties file), otherwise requests are sent to the remote server over RMI or a socket.
Does this sound correct?
- Rolf.
+Pie Number of slices to send: Send
Hey Rolf, the same question was posted a couple of days ago as "Database location ".
If you are still having doubts, you can ask them.
Hope this helps.
+Pie Number of slices to send: Send
Hi Rolf,

Originally posted by Rolf Johansson:

I interpret this as meaning the user can specify the DIRECTORY in which the dtabase file lives. So I made the directory in which the database file lives a property that can be administered by the user. The name of the database file is hard-coded to the name of the database file given with the initial instructions. Am I correct in interpreting "location of the database" as "directory where the database file is"?

It seems unusual (and a bit more complicated) to me for the name of the database file to be hard-coded, but for the directory path to that file to be configurable. Do you really want to prohibit the user from ever changing the name of the database file? It seems more natural for me to interpret "location of the database" to mean the path and name of the database file. Also, I recommend the use of a JFileChooser to allow the
user to select the database file. I suppose the JFileChooser could be configured somehow to only allow the user to pick the directory path, but I think that is awkward and goes against the user's expectations for the JFileChooser.

For the second part of the requirement, I'm assuming this "indication that a local database is to be used" is satisfied by the much-discussed "mode" flag. If the "mode" flag is set to "alone" then a local database is used (taken from the directory specified in the properties file), otherwise requests are sent to the remote server over RMI or a socket.
Does this sound correct?

I agree with this, as far as it goes. There are three operating modes: standalone, network client, and server. I think the database file must also be configurable when the executing the command:

 
Destiny's powerful hand has made the bed of my future. And this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 621 times.
Similar Threads
How to process the networking with a local database?
about the "server" instructions
Assignment Issue
Server database file location
B&S: Command Line
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 10:15:37.