my dog learned polymorphism*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes client or server specifies Db name? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "client or server specifies Db name?" Watch "client or server specifies Db name?" New topic
Author

client or server specifies Db name?

Colin Froggatt
Greenhorn

Joined: Feb 26, 2002
Posts: 10
Hi, I'm nearing completion of the assignment and I thought I had it sussed. Then I read Marks comment about the server only specifying the db name and started to get nervous.
Now, I assumed (theres that horrible word) that the user would specify which db file to open. I'm working against an old (2yrs+) assignment where I have had to write a data importer and therefore can have any db name. Do people think this is a reasonable assumption. It means that my Db server can handle connections to multiple Data objects with multiple clients (via RMI) which was not too difficult to impl.
My client command line looks something like :
dbclient localDbname.db
dbclient remoteDbname.db client.policy hostname [port]

What I would like to know is if anyone else has implemented this type of solution and passed or if people think that this is so far wide of the mark I should consider rewriting bits to support only one Db per server, which would be simpler.
Any comments may help me sleep tonight
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Remember, you are asked to code for reuse. And I've said it before: FBN is the only project I've done that had just one database table. Given that, and how trivial it is to do, coding the server to handle multiple tables is not an oddball idea at all.
My server code could handle multiple tables. I passed (>2 years ago) with, if memory serves, full marks on design.
- Peter
Colin Froggatt
Greenhorn

Joined: Feb 26, 2002
Posts: 10
Thanks for the quick reply Peter. Anyone else been down this route?
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

And also realize that my comments are based on the newer version of the assignment, so I have only had one database db.db file and it is always named that. )))
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: client or server specifies Db name?