Questions tagged [mnesia]

A distributed DataBase Management System used in Erlang applications.

Mnesia is a distributed DataBase Management System (DBMS), appropriate for telecommunications applications and other Erlang applications which require continuous operation and exhibit soft real-time properties.

414 questions
0
votes
1 answer

Suggestion's required on organising data in schema free way

I wanted check if i plan to use "erlang record" storing ability as schemaless store, what kind of performance impact i would have. to be more clear: I need to have table : person, age, gender,{other attributes, Marital status, Number of…
Mahantesh
  • 79
  • 8
0
votes
2 answers

How i can send data from mnesia via websocket

I have mnesia DB with table artists: (gw@gw)227> lookup:for_test(). {atomic,["Baltic Baroque","Anna Luca","Karel Boehlee Trio", "Bill Evans","Dino Saluzzi and Anja Lechner", "Bill Evans Trio with Stan Getz","Duke Pearson", "The John…
Black_13
  • 51
  • 5
0
votes
3 answers

running mnesia node with its business logic as an OS deamon

I have developed an application which i have been running in the erlang shell by following this order. $erl -name nodename@192.168.0.1 -mnesia dir '"/home/app/logic/database"' -setcookie cookie nodename@192.168.0.1> cd("/home/app/logic").…
0
votes
1 answer

Record not found

I follow the REST API with yaws tutorial of the 'Building web application with Erlang' book. I get the following error when starting $ yaws : file:path_eval([".","/Users/"],".erlang"): error on line 3: 3: evaluation failed with reason…
btype
  • 1,593
  • 19
  • 32
0
votes
2 answers

how to use mnesia:select/4 and mnesia:select/1 for paging query

a table named "md" with structure {id,name},I want read records from md use paging query,I tried mnesia:select/4 and mnesia:select/1 as below: %% first use select/2: "ID < 10",returned [1,2,4,3,8,5,9,7,6] (ejabberd@localhost)5>…
mahengyang
  • 289
  • 2
  • 16
0
votes
2 answers

Erlang Mnesia Unique keys except primariy key

I want to create the following table in mnesia: -record(cuser, { id, login_id, email, ....}). where login_id and email are both unique in business logic. How can I implement it in mnesia? Thanks in advance.
Zhenguo Yang
  • 3,800
  • 5
  • 18
  • 22
0
votes
1 answer

How to create table in erlang mnesia with multiple unique columns?

something like unique column in sql. Any suggestion?
Zhenguo Yang
  • 3,800
  • 5
  • 18
  • 22
0
votes
1 answer

Mnesia bad_object_header error

I am getting an unusual error with some simple mnesia code. This question is a followup to this other question of mine, but now I have code to reproduce the issue. I am using this erlang: Erlang R16B01 (erts-5.10.2) [source] [64-bit] [smp:4:4]…
Johnny Test
  • 107
  • 1
  • 7
0
votes
1 answer

Erlang starting with Mnesia, write Issues

I'm having some issue inserting data in a Mnesia database. Here's the code : (schema already exists) -module(mnesia_test). -record(messages_queue, {id, ack, order, message}). -export([start/0, add/0]). start() -> mnesia:start(), …
TheSquad
  • 7,385
  • 8
  • 40
  • 79
0
votes
4 answers

Mnesia - Check for a value in either of the keys in the table

I have a mnesia table "users" created with the following record -record(users,{username,nickname,age}) Let's say i have the mnesia table like the following records users | username | nickname | age users | John | baddy | 25 users | Monk …
Kalai Vannan
  • 1
  • 1
  • 1
0
votes
1 answer

creating mnesia from an erlang module

This should be simple, although I could not find a way or example yet... The Mnesia documentation shows how to initialize/create an Mnesia database from the erlang shell, which requires to start the erl shell with the -mnesia parameter: erl -mnesia…
gextra
  • 8,439
  • 8
  • 40
  • 62
0
votes
1 answer

display information of each records in erlang

I have this tables : -record(person, {id, firstname, lastname}). and it contains this values : 13 asma chabani 14 nawel jirard 15 ahme bahri I want to display the firstname and lastname of each record : I try with : test()-> …
francoi mocci
  • 47
  • 3
  • 9
0
votes
1 answer

Is it necessary to add a sequential column for insert order in mnesia?

I want to fetch records from mnesia by inserted order. At first, I want to add a timestamp column. But it is found for a group of nodes of different computers, the timestamp is created by different computers. It can't be guaranteed that these…
Chen Yu
  • 3,955
  • 1
  • 24
  • 51
0
votes
1 answer

Records in mnesia

I have the following small table in Erlang mnesia database. When I use the dirty_select function as follows: mnesia:dirty_select(user, [{#user{id = '$1', name = martin}, [], ['$1']}]). I get the error: * 1: record user undefined The user table has…
Vombat
  • 1,156
  • 1
  • 15
  • 27
0
votes
1 answer

Handling "down" mnesia node if it contains most recent schema?

I have two nodes- 1 and 2, both running. Node 1 goes down. Node 2 carries on running- it is a remote node. The computer for Node 2 is turned off. When I start Node 1, it knows Node 2 has the most recent schema. What is the best strategy for handling…
teddyw
  • 33
  • 3
1 2 3
27
28