File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Database Design Suggestion" Watch "Database Design Suggestion" New topic
Author

Database Design Suggestion

Michael Bulpin
Greenhorn

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: Data.java is a member of DataAccess.java 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 LockManager.java. 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 Data.java in some designs and conditional code to implement locking.
Mick
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

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.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
Don't get me started about those stupid light bulbs.
 
subject: Database Design Suggestion
 
Similar Threads
My design works perfectly but is it ok...?
posting again...pl help
Design Choice...(Post your opinions)
Can we extend interface?
FBN Architecture Query