snibu
snibu

Reputation: 581

Data structure functioning like Database in C or C++

Is there a data structure which gives you functions of a database (like insert, update, delete etc)? For example:

I know that with a hashtable you can do this (ex: uthash library). But as far as I know updating one column element only is not easy in a hash table.

Upvotes: 4

Views: 1886

Answers (3)

ucefkh
ucefkh

Reputation: 2531

Look At NoSQL itis The RMDBS used By FaceBook

Upvotes: 1

salva
salva

Reputation: 10242

Use C structs to represent rows of data and then trees (or maybe hashes) for indexes. There are a lot of little problems you will need to solve, specially in order to make all the operations efficient, but this forms the basis for an in-memory table.

For simple things, a tree structure may be enough.

Upvotes: 0

Blagovest Buyukliev
Blagovest Buyukliev

Reputation: 43558

Look at sqlite. Rather than a relational database system, it is essentially a connectionless, file-based database library that supports SQL. You link your program against it and it provides functions to perform SQL queries over data files.

Upvotes: 2

Related Questions