Jump to content

Erlang Programming/Database Programming

From Wikibooks, open books for an open world

Databases in Erlang

[edit | edit source]

Dictionary

[edit | edit source]

Data can be stored in many ways in Erlang. Each process has a local dictionary that uses put and get.

2> put(hello,world).  
undefined
3> get(hello).
world

Data can be stored with the ETS (Erlang table storage system) via the ETS library. It creates data at the process level. See Using_Ets.

Mnesia

[edit | edit source]

Mnesia is a distributed database that lives in the local file system.

External Databases

[edit | edit source]