[Ericsson AB]

1 Introduction

This book describes the Mnesia DataBase Management System (DBMS). Mnesia is a distributed Database Management System, appropriate for telecommunications applications and other Erlang applications which require continuous operation and soft real-time properties. It is one section of the Open Telecom Platform (OTP), which is a control system platform for building telecommunications applications.

1.1 About Mnesia

The management of data in telecommunications system has many aspects whereof some, but not all, are addressed by traditional commercial DBMSs (Data Base Management Systems). In particular the very high level of fault tolerance which is required in many nonstop systems, combined with requirements on the DBMS to run in the same address space as the application, have led us to implement a brand new DBMS. called Mnesia. Mnesia is implemented in, and very tightly connected to, the programming language Erlang and it provides the functionality that is necessary for the implementation of fault tolerant telecommunications systems. Mnesia is a multiuser Distributed DBMS specially made for industrial telecommunications applications written in the symbolic programming language Erlang, which is also the intended target language. Mnesia tries to address all of the data management issues required for typical telecommunications systems and it has a number of features that are not normally found in traditional databases.
In telecommunications applications there are different needs from the features provided by traditional DBMSs. The applications now implemented in the Erlang language need a mixture of a broad range of features, which generally are not satisfied by traditional DBMSs. Mnesia is designed with requirements like the following in mind:

  1. Fast real-time key/value lookup
  2. Complicated non real-time queries mainly for operation and maintenance
  3. Distributed data due to distributed applications
  4. High fault tolerance
  5. Dynamic re-configuration
  6. Complex objects

What sets Mnesia apart from most other DBMSs is that it is designed with the typical data management problems of telecommunications applications in mind. Hence Mnesia combines many concepts found in traditional databases, such as transactions and queries with concepts found in data management systems for telecommunications applications, such as very fast real-time operations, configurable degree of fault tolerance (by means of replication) and the ability to reconfigure the system without stopping or suspending it. Mnesia is also interesting due to its tight coupling to the programming language Erlang, thus almost turning Erlang into a database programming language. This has many benefits, the foremost is that the impedance mismatch between data format used by the DBMS and data format used by the programming language, which is used to manipulate the data, completely disappears.

1.2 The Mnesia DataBase Management System (DBMS)

1.2.1 Features

Mnesia contains the following features which combine to produce a fault-tolerant, distributed database management system written in Erlang:

Details of these features are described in the following sections.

1.2.2 Add-on Applications

QLC and Mnesia Session can be used in conjunction with Mnesia to produce specialized functions which enhance the operational ability of Mnesia. Both Mnesia Session and QLC have their own documentation as part of the OTP documentation set. Below are the main features of Mnesia Session and QLC when used in conjunction with Mnesia:

1.2.2.1 When to Use Mnesia

Use Mnesia with the following types of applications:

On the other hand, Mnesia may not be appropriate with the following types of applications:

1.2.3 Scope and Purpose

This manual is included in the OTP document set. It describes how to build Mnesia database applications, and how to integrate and utilize the Mnesia database management system with OTP. Programming constructs are described, and numerous programming examples are included to illustrate the use of Mnesia.

1.2.4 Prerequisites

Readers of this manual are assumed to be familiar with system development principles and database management systems. Readers are also assumed to be familiar with the Erlang programming language.

1.2.5 About This Book

This book contains the following chapters:


Copyright © 1991-2006 Ericsson AB