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 Database Design Suggestion 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 "Database Design Suggestion" Watch "Database Design Suggestion" New topic

Database Design Suggestion

Michael Bulpin

Joined: Oct 30, 2002
Posts: 7
Hi guys,
I�ve seen a few designs in this magnificent forum, and I have a suggestion for another server/database design, and would like your thoughts on it, especially from a Bartender?
Draw your UML as follows: is a member of and is Singleton controlled. DataAccess is in purely used for local access to the database and implements DataAccessInterface that in turn extends Remote for RMI. DataAccessServer extends DataAccess implements UnicaseRemoteObject and uses overriding for the methods that use locking via the member I think the difference is that the DataAccessServer extends on the DataAccess�s functionality � to basically implement the record locking.
A connection factory can still work as DataAccessServer implements the DataAccessInterface indirectly through DataAccess.
This design removes the need for separate remote and local access classes to in some designs and conditional code to implement locking.
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Singleton controlled

don't need to make it a Singleton.

This design removes the need for separate remote and local access classes

In your design DataAccess is your seperate local access class and DataAccessServer is your seperate remote access class. BUt you only have to override the methods that are different between the two modes.
It's kind of similar to my Beta assignment, however that was just to resolve the problem with their Interface not being complete, and having to create another interface that extends the first interface.
The big key to your design will be to see if it can accomodate all the requirements onf the assignment.
I think it should be fine.

Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: Database Design Suggestion
It's not a secret anymore!