File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes db.db Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "db.db" Watch "db.db" New topic


Mike Wiegand

Joined: May 30, 2001
Posts: 15
I am confused...
How many copies of db.db should exist? Is there one for local and a different one for the networked? Or, if networked access is selected, should the remote server connect to the local db.db via a URL?
ruilin yang
Ranch Hand

Joined: Feb 25, 2001
Posts: 334
You have two choices:
1) one copy of db.db stored at the server side with two copies of client programs (e.g. GUI's for local and remote modes);
2) two copies of db.db one at server and one at client side., with only one copy of client programs.
For the choice 1), you will have to have two copies of client programs: one copy at client for remote access to database and other copy at server for local access to database. When you run the local mode you will start the system at the server side. When you run the system in remote mode you will have to run at the client side.
For the choice 2), you will have 2 copies of db.db, but with one single copy of client programs. You will run the system always at the client side. The client have a choice for remote/local mode at the beginning of running the program (e.g. 1st GUI).
The advantage of the 1) choice is that you do not need to synchronize db.db. The inf allways consistent. The booking confirmation is instant. But you have to run the two modes from different sides (client and server). This means that client do not always have access to the system. When the system is not available in network mode you have to assume that a client has to make call to contact server side to ask a booking.
The advantage of the 2) choice is that the client always have access to the system and you can run the system from only client side for both modes (remote/network). You only need one copy of clent programs. Therefore, maintanence of the system is simple. However, you have to periodically sychronize the two copies of db.db. The client can not get instant confirmation for booking when the system is running in local mode. In this case the client can only get confirmation for booking later when the system is running in network mode.
I am not sure what Sun want us to do .
Anybody have some insight on this please make comments.
Mike Wiegand

Joined: May 30, 2001
Posts: 15
Thanks Ruilin. After browsing thru some of the older emails, someone that passed said that he had a single copy of db.db.
After some thought, I think that 1 db.db is the way to go. Since the client and the server are going to be on the same machine for this assignment, I will have the remote server connect to the same instance of db.db that the local client would. Thanks for your help!
I agree. Here's the link:
subject: db.db
It's not a secret anymore!