MyDDB is a simple database management system write in C, created to be small, it's very useful in projects with non-sensitive data, because the data is stored in a flat-file with only rows and columns. using a relational database model, and basic commands CRUD-based (Create Read Update Delete).
MyDDB code is portable for Linux and Windows.
MyDDB is self-contained in two files: myddb.h and myddb.c To use MyDDB, simply add those two files to your project.
It's a very simple sintax, has just two elements: (a "command" followed by an "argument") some commands has no argument.
PATH "../base" #set a directory path
FROM "data" #set a database
PRINT 1 #print in long format
EXCLUDE "data" #explude a database
CREATE "data" #create a database (file: data.ddb)
SHOW #show database files
VER #show myddb version
HELP #show help commands
myddb main function it's like printf in c.
myddb_open();
int value = 1;
myddb("FROM helloworld PRINT %d", value);
myddb_close();
+--+-----+-----+
|id| name| time|
+--+-----+-----+
| 0|Alice| AD 1|
| 1| Bob| 1 BC|
+--+-----+-----+
- The data in MyDDB file, are divided in two non-printable ASCII characters.
DEC | HEX | CHARACTER |
---|---|---|
3 | 3 | END OF TEXT (ETX) |
29 | 1D | GROUP SEPARATOR (GS) LEFT ARROW |
- Inside helloworld.ddb file, you'll see this.
- id GS name GS time ETX 0 GS Alice GS AD 1 ETX 1 GS Bob GS 1 BC ETX
The code of MyDDB is licensed under MIT License.