Database / Mnesia basics Interview questions
What is a Mnesia node?
In Mnesia's context, a "node" is simply an Erlang node (a running BEAM instance with a name) that participates in a Mnesia database, either holding copies of tables directly or just being schema-aware of the cluster. A single logical Mnesia database can span several such nodes, all coordinating table replication and transactions between them.
mnesia:create_schema([nodea@host1, nodeb@host2]), mnesia:create_table(person, [{disc_copies, [nodea@host1, nodeb@host2]}, {attributes, [id, name, age]}]).
Which nodes hold a copy of a given table is decided per-table via the storage type options
(ram_copies, disc_copies, disc_only_copies), and a node doesn't need to
hold every table in the schema — you can have some nodes replicate only a subset of tables relevant to
their role, while still being part of the same overall Mnesia cluster.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
