- for data needed between invocations of the contract
- find, emplace, modify
- provides a structured way to access the data
- Why do we need to have persistent storage?
We need to have persistent storage as it contains the EOS blockchain state and therefore must be available at all times. This includes the tables that hold order books, account balances, contract statuses, and voting data. Persistent storage is designed to survive independently of any running instance, it can be used for any data that needs to be reused. Reuse can be either by different instances or beyond the life of a specific instance.
- What are the functions to manage a database?
The primary key must be unique and an unsigned 64-bit integer type.
- What are the benefits of having iterators instead of a traditional key-value storage option?
The main benefit is that they allow the code to be less type-dependent. The iterator will still work even if you change the underlying container type that is being iterated. Iterators are class objects which encapsulate safe node pointers that are only exposed via the iterator’s methods. Iterators can be used to provide differing table views where the table has multiple secondary indices.
-
Why do we need to have persistent storage?
Through persistence storage, a Multi-Index DB, data can be stored and accessed in the Block Chain: The Boost Multi-index Containers Library provides a class template namedmulti_index_container
which enables the construction of containers maintaining one or more indices with different sorting and access semantics(https://www.boost.org/doc/libs/1_59_0/libs/multi_index/doc/index.html). -
What are the functions to manage a database?
- Querying an entry with
.find
- Creating new entries with
.emplace
- Modifying existing entries with
.modify
- What are the benefits of having iterators instead of a traditional key-value storage option?
Iterators permit multiple scopes views in a multi-index-table database. Making data manipulation easier.
-
Why do we need to have persistent storage?
We need persistent storage to store data permanently on an EOS blockchain since all values called by a contract exist only temporarily and was eliminated after a contract function calling for the value ends. -
What are the functions to manage a database?
There are functions to create a new database entry, to query an entry, and to modify an entry. -
What are the benefits of having iterators instead of a traditional key-value storage option?
As the content of a search is cached in an iterator, repeated calling of the intended search object can be quickly done by calling the iterator. Iterators can also facilitate quick lookups by moving forward or backward within the records by built-in methods in the iterator.
- Why do we need to have persistant storage?
The EOS database is a special feature that enables you to store indexed data into the blockchain, formatted inside defined data structures.
- What are the functions to manage a database?
Action and table
- What are the benefits of having iterators instead of a traditional key-value storage option?
The iterator on itself can return the current object by object dereference or as object instance. The iterator on itself can then be iterated through to retrieve the next or previous object inside the database. This can be useful during iteration through objects in that table.
-
Why do we need to have persistant storage?
To store data to access at a later time. -
What are the functions to manage a database?
Query .find
Create .emplace
Modify .modify -
What are the benefits of having iterators instead of a traditional key-value storage option?
More efficient.
- Why do we need to have persistant storage?
We need to have persistant storage so we can store data before then.
2. What are the functions to manage a database?
*In order to manage a database we need 3 functions find: "Querying an entry with", Emplace: "Creating new entries with", modify: "Modifying existing entries with".*
- What are the benefits of having iterators instead of a traditional key-value storage option?
Since we have iterators we can have lots of table views, the table can have lots of other indexes
-
Why do we need to have persistant storage?
to save all transactions, view data at a later time. -
What are the functions to manage a database?
we use 3 functions, .find, .emplace, .modify. -
What are the benefits of having iterators instead of a traditional key-value storage option? multiple table views
1.) To save data even when the contract isn’t active
2.) querying with: .find
creating new entry with: .emplace
Modifying entries with .modify
3.) Iterators have some features.
can return an object by object dereference or as object instance
can iterate through objects = next, previous
- Why do we need to have persistant storage?
Saving data over time, even when it is not being used at the moment.
-
What are the functions to manage a database?
.find, .emplace and .modify -
What are the benefits of having iterators instead of a traditional key-value storage option?
iterate can search through the whole table, more effective
Why do we need to have persistent storage?
Persistent storage is crucial to maintaining a useful ecosystem. Persistent storage in economies, large and wide, retain balances and snapshots of truth.
Without persistent storage, the only way to gather this truth would be by storing the data on centralized servers which could be compromised.
What are the functions to manage a database?
You may use:
-
.find
to query the database -
.emplace
to create a new entry in the database, and -
.modify
to modify existing entries in the database.
What are the benefits of having iterators instead of a traditional key-value storage option?
A key-value pair is unable to iterate through entries in a table. It will only return one value for a given key.
Iterators, on the other hand - can jump through entries within the database, and either query individual entries, or perform some calculation on each entry.
1 - Why do we need to have persistent storage?
We need to have persistent storage so we can save critical data and to reduce the chance of data loss between sessions.
- Tables are used to store persistent data in EOS.
2 - What are the functions to manage a database?
The functions to manage a database are:
-
.find() - used to query an entry
-
.emplace() - used to create new entries
- arguments:
emplace(
uint64_t payer,
Lambda&& constructor
)
- .modify() - used to modify existing entries
- arguments:
modify(
const T& obj,
uint64_t payer,
Lambda&& updater
)
3 - What are the benefits of having iterators instead of a traditional key-value storage option?
Iterators allow you to walk through the table and get different views of the table data, whereas key-value can only return one value for the given key.
- Why do we need to have persistant storage?
So you dont lose your Data each time your device is shut down.
Persistent storage is any data storage device that retains data after power to that device is shut off . It is also sometimes referred to as non-volatile storage. Magnetic media, such as hard disk drives and tape are common types of persistent storage, as are the various forms of Optical media such as DVD.
- What are the functions to manage a database?
• Data Storage Management. …
• Security Management. …
• Backup and Recovery Management. …
• Database Access Language and Application Programming Interface. …
• Data Dictionary Management. …
• Data Transformation and Presentation. …
• Multi User Access Control. …
• Data Integrity Management.
- What are the benefits of having iterators instead of a traditional key-value storage option?
Use of an iterator simplifies the code and makes it general. Benefits of using this iterator API include: treats variables of all types, sizes, and shapes uniformly, whether they fit in memory or not, even if a single row won’t fit in memory . makes recursion unnecessary in handling arrays of arbitrary dimensionality.