This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes modification of db.db Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "modification of db.db" Watch "modification of db.db" New topic
Author

modification of db.db

Tejs Bomme
Greenhorn

Joined: Jun 03, 2003
Posts: 1
Hello,
I am currently completing the FBNS assignment and reading the instructions from Sun, I have found a couple of issues which I can�t seem to figure out myself.
1: Describing the db.db file, the instructions say
You may not modify this file, but you may move it if you wish.

Does this mean that I am not allowed to change the "Available seats" attribute for a record when I book a seat, or does it (only) mean that I am not allowed to change the structure of the file?
1.1: My initial implementation can book flights on one of the 24 provided flights by changing the "Available seats" attribute for a record in the db.db file. BUT if I am not allowed to change the db.db, I will have to make a new db-file and use the db.db as a sort of flight schedule. My new db will then have a schema that looks something like [Flight num][Available seats]. Introducing a new db-file is something I would like to avoid if possible.
1.1.1: If I have to introduce a new db-file, I might as well add a Date attribute so that I using db.db a schedule, can book a flight on a specific date not "just" "2 seats on SA001 on Monday" but "2 seats on SA001 on 06.01.2003". This is probably more realistic, but is it necessary?
I hope you can help me with your thoughts on these considerations.

BR
Tejs
Philippe Maquet
Bartender

Joined: Jun 02, 2003
Posts: 1872
Hi Tejs,
I feel the same sort of fright about many of the "must-be" injunctions in my own assignement (URLyBird) : if, after a search for the coupled words "automatic" and "failures", you re-read the whole assignment, well you can get afraid, indeed ... :-)
I cannot answer for sure in your case because I have a different assignment. But by re-reading the whole assignment doc and using some common sense, I think that such a question brings the right answer : if you have only one database file (as in the URLyBird assignment), it doesn't make any sense to keep it read-only... So the "you may not modify this file" instruction should mean that you cannot bring any structural change to the file.
Warning : In my own assignement, in the packaging section, I got a related "must-be-or-fail" instruction :

The original, unchanged database file that was supplied to you. Note that you must keep a copy of the original database file supplied to you, and this must be the file you submit. The marking process will expect the exact same data without any changes.

If it's applicable for you, make sure you upload the original file and not the one you used for testing.
Regards,
Damian Ryan
Ranch Hand

Joined: May 09, 2003
Posts: 117
I think a reasonable interpretation of the instructions is that you may not alter the structure of the datafile, but you may alter the values of the fields in the file.
If you were unable to alter the fields' values then you would be unable to make bookings.
When I did my assignment, I kept the original db.db file aside (remember, part of your instructions say that you have to resubmit all the original files sent with your assignment), and used a copy in a directory called "data" for testing and running the application.
I just found out today that I passed, so the examiner can't have had any probem with my approach
I think you already answered your second question. It seems like the unnecessary introduction of complexity, and that could create scope for losing marks.


Always proofread carefully to see if you any words out.
 
 
subject: modification of db.db