• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Final database design. Your comments, please.

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
package suncertify.db;
----------------------
class Data
- implements criteriaFind()
- lock()/unlock() not implemented
- deprecated methods replaced
package suncertify.db.server;
----------------------------
interface RemoteDataInterface:
- same methods as Data plus RemoteException
interface DataServerInterface
- is a factory of ServerConnection
- Has only one method: RemoteDataInterface Connect()
class DataServer:
- one instance per database
- extends Data
- implements DataServerInterface
- implements lock/unlock behaviour. keeps all locks granted to all clients in a list
- Connect returns an instance of ServerConnection.
class ServerConnection
- Is an adapter class that delegates calls to the single DataServer instance
- implements RemoteDataInterface
- one instance per client connection
- keeps a list of locks granted to this
client. lock()/unlock() keep this list
updated to validate calls. like to avoid
unlocking records not locked by the client.

package suncertify.client;
-----------------------
interface DataConnection:
- same methods as Data class.
- throws only DatabaseException in all methods.
- The gui client uses this interface to access
the database.
class RemoteDataConnection
- implements DataConnection
- Adapter class that delegates all calls to an
instance of RemoteDataInterface
- when delegating calls to the internal
RemoteDataInterface, all exceptions catched
are bubbled up canned in a new
DatabaseException
class LocalDataConnection
- implements DataConnection
- Adapter class that delegates all calls to an
instance of Data
- All exceptions catched when delegating calls
to the internal Data are thrown wrapped in a
new DatabaseException.
class DataConnector
- singleton with only two static methods:
DataConnection connectLocal (databasefile);
DataConnection connectRemote(String host);
- these methods returns instances of
RemoteDataConnection or LocalDataConnection
depending on the connection mode.
[ March 24, 2003: Message edited by: Marcos Motta ]
[ March 24, 2003: Message edited by: Marcos Motta ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic