The DBMS server

Describes the features of the DBMS server.

A session with the DBMS server provides the basis for sharing databases with other threads; the DBMS server allows shared read/write access to databases by multiple clients.

A session with the DBMS server is set up through an instance of the RDbs class. The behaviour of this class is similar to other session classes, for example, the file server session class, RFs.

A client opens a connection with the DBMS server using the Connect() member function of RDbs and closes the connection by calling Close() on RDbs.

Some useful points to note:

  • a thread can open any number of simultaneous connections to the DBMS server

  • a session can be used to open any number of databases.

  • the same database can be opened many times within a single session; each such database object behaves independently with regard to transactions.

  • a database cannot be opened for client-side read access and client-server write access at the same time; if write access is required by one client, then all clients must use the DBMS server.

  • a session must be kept open until all DBMS objects opened through it have been closed.

Shared databases support all DBMS API functionality except database creation and changing the security key:

  • databases should only be shared once they have a fully constructed schema, otherwise clients may attempt to access a half-created database.

  • using the ChangeSecurity() member function of RDbDatabase to change the security key for a secure database makes no sense if the database is currently shared.

The client server interface offers utility functions which allow the client to check the number of allocated DBMS objects.

The interface also offers heap debugging support for the server's heap.