Questions tagged [database]

A database is an organized collection of data. It is the collection of schemas, tables, queries, reports, views, and other objects. The data are typically organized to model aspects of reality in a way that supports processes requiring information. Use this tag if you have questions about designing a database. If it is about a particular database management system, (e.g., MySQL), please use that tag instead.

Filter by
Sorted by
Tagged with
1 vote
1 answer
119 views

nested stuff inside index_table

I'm trying to build a small hearthstone like game and I've finished up the front-end for the game client. I created a NoSQL mockup of the user data and now it's time to move those to the index_table ...
Milos Krstic's user avatar
0 votes
1 answer
31 views

chainbase::database error

After program is terminated, user defined object cannot be loaded to chainbase::database. my code is followed. enum my_type { my_inx01_object_type }; namespace eosio { namespace chain { using ...
iambaeba1's user avatar
0 votes
1 answer
112 views

How to add mongodb to your private network unable to find plugin: eosio::mongo_db_plugin

I am trying to setup mongodb on private network node on cent OS 7 based server but it throws error unable to find plugin: eosio::mongo_db_plugin. I have uncommented mongo plugin settings in config.ini....
hassan ahmed's user avatar
0 votes
1 answer
38 views

Take output from GetActions and send to database using eossharp

I am using eos-sharp to get data from the eos smart contract. I am trying to get actions data by using: var resultaction = await eos.GetActions("dqzmember", 0, 30); I need information from ...
Varsh's user avatar
  • 307
0 votes
1 answer
99 views

how to save data in mongodb from eos smart contract?

I am getting the actions log data using an action constructor in a smart contract. I need to save this data in MongoDB from the smart contract. How can I do this? I didn't get exactly my required ...
Varsh's user avatar
  • 307
0 votes
1 answer
95 views

Why is snapshot size is so small?

1) Snapshot file size is remarkable small relative to blocks.log size. Exactly what data is stored in snapshot file? 2) As I understand contracts states is stored in snapshot file. But history_plugin ...
Teresa's user avatar
  • 125
-1 votes
1 answer
25 views

How does the Drive resource in EOS work? Can we store alot of text data and use it like a mysql database?

Ram is expensive for storing user data. EOS has the drive resources for storing data. How much does it cost compared to ram? And is it intended to be used like a mysql database for storing user data? ...
Patoshi パトシ's user avatar
1 vote
1 answer
422 views

Failed to migrate to postgres database: nerror: duplicate key value violates unique constraint \"pg_namespace_nspname_index\"

I have been trying to set up demux but I keep on getting this error, { error: duplicate key value violates unique constraint "pg_namespace_nspname_index" at Connection.parseE (/home/nodeos2/...
coder123's user avatar
  • 141
0 votes
0 answers
27 views

How efficient is the EOSIO software for distributed locking, relative to other database software?

I am researching the best software for distributed locking purposes, and came across this article: https://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.html I think the Redlock ...
wass's user avatar
  • 1
0 votes
1 answer
212 views

Storing database information into EOS

I have a bunch of user data and I want to store it in the EOS blockchain. Each user data doesn't exceed 1kb. At most it is just: name, phone, email, btc address, and btc private key (encrypted). I ...
Patoshi パトシ's user avatar
0 votes
1 answer
75 views

What is the most reliable way to sync contact account tables?

I have a contract account which has some tables. I want to watch for onchain table changes and sync them to an offline database as soon as possible. What is the most reliable way to do this? I have ...
Tommy Jiang's user avatar
0 votes
1 answer
77 views

How to read data at certain block number on EOS?

How to read data at certain block number on EOS? e.g. How could I read the data of a contract's table at certain block number?
luoyhang003's user avatar
3 votes
1 answer
617 views

How do I create a Multi-Index DB secondary index from a String?

I'm developing a Smart Contract for EOSIO. I have a Multi-Index table with a uint64_t primary key. I'd like to add a secondary index to the table. Ideally the data I'd be indexing on would be a std::...
Cody S's user avatar
  • 195
0 votes
1 answer
60 views

How to get/query creation time of account in mongodb?? (inserted data with monogo_db_plugin)

I'm syncing with mongo_db_plugin enabled. But, when I see 'acctounts' collection in mongo, createAt is time created in monogo, not actual eos mainnet. How can I query mongo to get accounts creation ...
n3wbie's user avatar
  • 71
1 vote
1 answer
118 views

Can we use mongodb store state?

I read chainbase and fork database, I understood chainbase which stores user state and fork database which stores blocks. So Can I use mongodb to store user state and ignore chainbase? If it can, we ...
user avatar
0 votes
1 answer
80 views

What is mongodb_plugin used for?

I have some confuse with chain_plugin and mongo_plugin, why do we need them? And if I can modify chainbase which can write directly state to disk, Do I can discard mongoDB?
user avatar
1 vote
1 answer
235 views

Can I use MongoDB for storing data locally instead of storing in RAM?

I found that storing data in EOS RAM is sometimes expensive in turn makes it impractical. Can I use MongoDB for storing such data locally instead of storing in RAM?
Muhzin's user avatar
  • 510
1 vote
0 answers
40 views

Is there a json schema file for eos that defines accounts, keys, transactions, blocks, etc

Is there a json schema file or data-model for eos that defines accounts, keys, transactions, blocks, etc...
grahappa's user avatar
4 votes
1 answer
94 views

Which BP's offer snapshots for v1.4? --mongodb-wipe?

Which BP's or websites offer snapshots for v1.4 ? Is --mongodb-wipe still required for replaying?
Marcel's user avatar
  • 383
1 vote
1 answer
103 views

eosforumdapp mongodb : unsupported_abi_version_exception: ABI has an unsupported version

Syncing my node, everything works fine. I get a warning though when processing transactions from eosforumdapp and eosforumcpp info 2018-10-20T09:07:14.286 thread-1 mongo_db_plugin.cpp:481 ...
Marcel's user avatar
  • 383
3 votes
4 answers
282 views

Is LevelDB used in EOS?

I know Ethereum uses leveldb. When I checked into EOS I could not find that much out. I thought when I tested I did see leveldb. Can someone confirm how the immutable data is stored? EDIT I think ...
Trevor Lee Oakley's user avatar
1 vote
1 answer
144 views

make nodeos use mongod.conf to change dbpath

Currently when trying to use the mongodb plugin, I get this error 2018-10-11T15:47:15.635 thread-0 mongo_db_plugin.cpp:513 handle_mongo_excepti ] mongo exception, mongo init, line 1391, code ...
Marcel's user avatar
  • 383
2 votes
1 answer
52 views

What actully happens in the background when a block is created?

I want to know the whole background process of the block creation what is the actual implementation what happens? Where it stores the data? How it stores the data?
yash vadhvani's user avatar
1 vote
2 answers
2k views

Where is the mongodb stored?

Seems my node is syncing, but so far I cannot find the mongodb and the path isn't mentioned in the docs. Trying to setup a non-producing node to query specific incoming transactions. Using Ubuntu 16....
Marcel's user avatar
  • 383
4 votes
2 answers
150 views

EOS smart contracts and big data

Imagine situation when I need to save a big data In smart contract (for example 1000 000 000 row of information - or just 1 TB). In case of ETH it's almost impossible because gas price goes to hell. ...
Chemistry's user avatar
  • 225
0 votes
1 answer
706 views

What is the ChainBase database used for?

EOSIO appears to make use of the Chainbase database for various functions in the codebase. What is this used for and how does it relate to the RAM concept in EOSIO? Is it simply the database used to ...
confused00's user avatar
  • 5,554
3 votes
1 answer
154 views

Why doesn't EOS use other database?

Currently in EOS, it uses the memory database with the mmap and customized session, and sometimes when the node is down, it will cause inconsistent state and the data can't be recovered, we need to ...
Jimmy Guo's user avatar
  • 1,066
2 votes
2 answers
207 views

How can I download all ledger blocks as a JSON dump?

I'm trying to download a relatively up-to-date dataset of all blocks in JSON format, but haven't found a good solution: cleos can only fetch blocks one by one ($ cleos get block n) which is way too ...
confused00's user avatar
  • 5,554
1 vote
1 answer
176 views

How to retrieve historical EOS supply?

I know $ cleos get currency stats eosio.token EOS reports the current supply in the blockchain, but how can I get the supply through time?
confused00's user avatar
  • 5,554
1 vote
2 answers
542 views

One-to-many relationship in Multi Index Tables

Is there a method for storing one-to-many relationships within a table? Say I had a Player, and the player had multiple Tickets. How could I store multiple ticket primary keys within one player?
Mitch Pierias's user avatar
1 vote
1 answer
171 views

Why use databases in smart contract?

As we can store data in map, why we need to create table for it, and why we need to pay for the fee for create and modify records? How much is the ram fee, how to avoid it? If I use map, who will ...
Jimmy Guo's user avatar
  • 1,066
2 votes
1 answer
102 views

How do you stream data from an input file when writing contracts on EOS?

I emulated the tic.tac.toe tutorial code and made a simple contract that allows me to add and remove car information. However, I can only push action one at a time and this only allows me to add/...
Tim Zhang's user avatar
  • 103
7 votes
1 answer
698 views

Can a smart contract communicate externally?

Can EOSIO smart contracts communicate externally, say, to some external (preexisting) web-service? I suspect the answer is no, as this would violate determinism, among other guarantees. What is the ...
Aaron Voelker's user avatar
2 votes
3 answers
231 views

SQL-like database in contract?

How would one implement or use an SQL database in a contract? What would be the best practices for this? There could be a lot of data here, but I need to easily select and update.
expaand's user avatar
  • 654
4 votes
1 answer
117 views

Does EOS DB support text-based queries?

Can I query a table with an indexed string column a la SQL? Is something like this possible for example: SELECT * from <table_name> where <my_string_column> LIKE '%test%';
onions's user avatar
  • 41
14 votes
3 answers
798 views

Are Tables/DBs stored in RAM and held by multiple block producers?

We do have the Persistence API to store data for a smart contract in the EOSIO database. I was wondering where this database is located. I understood that it is patterned after Boost Multi-Index. 1) ...
tmm's user avatar
  • 2,114