• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Database configuration details

 
Ranch Hand
Posts: 74
5
Eclipse IDE Python Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I stumbled across the following phrase in my assignment instructions:

"The program must allow the user to specify the location of the database in both standalone and network mode and persist the db configuration details in suncertify.properties file. The application must read the properties file to determine the location of the db and display the data from the db."


The terms "persist the db configuration details" and "must read the properties file to... and display the data from the db" have made me nervous. How would you interpret this sentence? It's a must criterion and thus I don't want to understand it incorrectly. When reading it first time I thought that only the database file location was meant with it but it could be also understand that other parameters for reading the file, such as the information about the file structure given in the instructions, would be implied. For instance the file encoding which is US-ASCII is a "db configuration detail" and could be read from the properties to "display the data from the db". Currently I have the encoding as a constant in my Data class but actually the instructions could be understood as that this parameter should be part of the properties instead.

What do you think?
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Christian

For the DB config, you are meant to put such info a the "suncertify.properties" file when the application loads. Subsequent runs will read this info from the properties file.

As you may noticed the assignment has "stand-alone" and "network" modes. Both modes need to be supported.

What information do you need to read the DB file in stand-alone mode? Same goes for reading in network mode?

How you save such info is up to you. When I did mine, I had some kind of Swing form for it.

Hope this helps and good luck.
 
Peter Muster
Ranch Hand
Posts: 74
5
Eclipse IDE Python Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello K.,

yes I understood that. I have a Swing mask that displays a few parameters like the database file location. These parameters can be edited in the mask and persisted to the properties file. They are of course read from client respectively server when connecting to the database file. The configuration mask can be accessed from the client. My question is what MUST be stored in the properties file? Only the database file location?

As I quoted from the instructions, "persist the db configuration details" and "must read the properties file to... and display the data from the db" both sound to me like Oracle implies that more than the location MUST be stored. For example it is important to set the right encoding to "display the data from the db" (Oracle quote) correctly and "db configuration details" is a plural so perhaps Oracle implies that the encoding which is US-ASCII as given in the instructions must be persisted to the properties file as well? Perhaps I'm just interpreting too much from the instructions wording but I don't want to fail the exam because I violated a MUST criterion.

If anyone tells me they stored only the database file location in the properties file and passed the exam with that, it's fine for me.
 
K. Tsang
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Christian Pflug wrote: My question is what MUST be stored in the properties file? Only the database file location?



I'm not suppose to list out the "what" for you, if I did I would be cheating to some degree.

If you think about it, storing the db file will work for the stand-alone mode. Anything else?

What about the network mode? How would the network server start? How would the network client connect to the server?

As for the encoding, I doubt that is needed.

Oh don't overwrite the parameters. Both modes will work once the config is set. Of course you delete the config file
 
Peter Muster
Ranch Hand
Posts: 74
5
Eclipse IDE Python Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

K. Tsang wrote:

Christian Pflug wrote: My question is what MUST be stored in the properties file? Only the database file location?



I'm not suppose to list out the "what" for you, if I did I would be cheating to some degree.

If you think about it, storing the db file will work for the stand-alone mode. Anything else?

What about the network mode? How would the network server start? How would the network client connect to the server?


I know what you're talking about and I didn't mention these explicitly for the exact same reason. My question was only directed on parameters that describe how the database file content is read. I'll assume then that parameters like the encoding do not necessarily have to be stored in the properties and will keep them in my Data class.
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Christian Pflug wrote:As I quoted from the instructions, "persist the db configuration details" and "must read the properties file to... and display the data from the db" both sound to me like Oracle implies that more than the location MUST be stored. For example it is important to set the right encoding to "display the data from the db" (Oracle quote) correctly and "db configuration details" is a plural so perhaps Oracle implies that the encoding which is US-ASCII as given in the instructions must be persisted to the properties file as well? Perhaps I'm just interpreting too much from the instructions wording but I don't want to fail the exam because I violated a MUST criterion.


You have already encountered the beauty of this assignment A few MUST requirements are defined in the instructions and you must implement these requirements, otherwise you'll definitely fail. But you can make your own decisions for all other stuff and every decision is a good one (if it's implemented correctly of course). And in the choices.txt you should explain why you took these decisions.

So this must requirement is all about persisting the properties of this application. Which properties you should persist is completely your own decision. If you think you need just 1 property (to have this application work in standalone mode, network server mode and network client mode), that's fine. If you want to persist 5 properties and persist the encoding and the magic cookie, that's fine as well. Like I said, that's definitely the beauty of this assignment

Although this topic is already 4 years old, it's still applicable to the current assignment (because it's still the same one ). And I'm pretty sure, it will answer all possible questions you could have about persisting the application properties.

Hope it helps!
Kind regards,
Roel
 
Peter Muster
Ranch Hand
Posts: 74
5
Eclipse IDE Python Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Roel!

Sorry for the late response, I was finalizing my project. That link helped a lot!
 
reply
    Bookmark Topic Watch Topic
  • New Topic