NNDB is not a database but is an online repository of people, organizations, and related data. It provides comprehensive profiles, biographies, and connections among people in various fields such as politics, entertainment, and science. It is a useful resource for researchers, journalists, and curious minds.
NNDB is a C++ library that provides in-memory data storage and retrieval in a way that feels natural for C++/STL. The syntax is easy to use and understand, with some similarities to SQL.
Examples:
Here is an example of NNDB syntax:
nndb::Table my_table;
my_table.Insert( nndb::Values("NNDB first row", 47));
nndb::ResultSet result_set = nndb::Select(nndb::select_star, my_table);
The above code does something similar to SQL:
CREATE TABLE my_table (col0 VARCHAR( ... ), col1 INT);
INSERT INTO my_table( col0, col1 ) VALUES ("NNDB first row", 47);
SELECT * FROM my_table;
You can use the result of your select with the following code:
nndb::ResultSet::const_iterator begin_it = result_set.begin();
const nndb::Values& first_row = *begin_it;
assert(nndb::Field(first_row) == "NNDB first row");
assert(nndb::Field(first_row) == 47);
Features:
NNDB offers useful features that are available in databases, some of them include:
- CREATE TABLE
- INSERT INTO table VALUES
- SELECT * FROM table
- SELECT ... WHERE ...
- SELECT ... ORDER BY ...
- SELECT ... WHERE ... ORDER BY ...
- Unique indexes
However, there are some useful features that NNDB does not have yet but might include in a future update:
- SELECT col0, col1 ...
- SELECT ... JOIN ...
- Non-unique indexes
- Save/load to disk
In contrast, there are several features that NNDB will never have, such as:
- Multiple simultaneous users
- User security
- Multiple processes.
Conclusion:
NNDB is an excellent choice for developers looking for a C++ library that provides in-memory storage and retrieval functionality. It is easy to use and understand and is an excellent alternative for developers who do not need the advanced functionality of traditional databases.
Version 0.1: N/A