RDBMS questions...

Ulf Wiger ulf.wiger@REDACTED
Mon Apr 26 12:31:21 CEST 1999


Mickael Remond wrote:
> 
> Hi,
> 
> I am trying to figure out how to make work the RDBMS contrib.
> 
> I remplaced the mnesia_schema file with the one in the mnesia 3.6
> distribution. I made the change marked as 'UW modif' in the
> RDBMS-mnesia_schema.
> 
> Everything seems to be ok, then. This change makes me able to create
> schema, to create table, etc.
> 
> But I did not really understand how to use this module. What about the
> sysMnesiaDict database ? Do I have to create it manually ?
> The add_properties functions return 'ok', but the operation did not seem
> to occur. Where are the properties stored ?
> 

Oops! I guess you're referring to the following comment in rdbms.erl?

%% 
%% Functions for accessing metadata.
%% -- metadata values are stored in the table 'sysMnesiaDict'
%%    which has the structure -record(sysMnesiaDict, {key, value}).
%%    where key ::= {Obj_type, Obj, Type}, e.g. {attr, {Table, Attr},
Type},
%%    {attr, Attr, Type}, {table, Table, Type}, or {record, Rec, Type}.
%%    

Never mind that. It's an old relic.
In the olden days, it wasn't possible to store user-defined properties
in the mnesia schema, so I had my own table. Nowadays, the properties go
into the mnesia schema as 'user_properties'.

You can inspect them by calling mnesia:table_info(Tab, user_properties).

> Do you have a comprehensive example on how to use it ?

Let me get back to you on that. I don't have one quite ready, but
perhaps later this week...


/Uffe
-- 
Ulf Wiger, Chief Designer AXD 301     <ulf.wiger@REDACTED>
Ericsson Telecom AB                          tfn: +46  8 719 81 95
Varuvägen 9, Älvsjö                          mob: +46 70 519 81 95
S-126 25 Stockholm, Sweden                   fax: +46  8 719 43 44



More information about the erlang-questions mailing list