Safety is provided by encapsulating access to the database in a process. Communication with the database is then carried out by passing messages to and from the MySQL process. The communication will follow a request-answer model: For each message passed to the process, there will be at least one message received. For safety, there will be separate protocols for incoming and outgoing messages.
The reason for providing access via. a process and not simply as ordinary library calls is that we want to avoid having to expose handles to the database to the application programmer. All state information should be handled internally in the process. For the same reason, each connection to the database will be a separate process. That way, we avoid handles to connections.
The standard way of retrieving data from the database is one row at a time. The basic retrieving method of MoA will work in the same way, but for convenience we will also provide a way of retrieving all rows of data with a single command.