Matricsoft - software development | |||||||||||||
news - products - downloads - support / feedback | |||||||||||||
products > Quickdb | |||||||||||||
|
Quickdb Description (release 2)Quickdb is a set of C++ classes that enables you to define and use databases from your C++ program. You can see the complete class definition, the different functionality or an example. Interface definition (C++ class definition)quickdb has been completely revamped since the release 1, and is now much more reliable and above all does not leak resources as it may have before. It now enables to create relations between tables (you get a relational database engine which is very fast). For ease of use, there is only one C++ class that your C++ program needs to use in order to create, read or write databases in memory or on disk (quickdb is not based on disk, all the information is kept in memory, however, you can save or load in XML). To see how easy it is to create a database, just consider this code: //creation of the database in memory... db mydb("jobs"); //creation of a table... mydb.new_table(); mydb.add_field("name", db_string); mydb.add_field("surname", db_string); mydb.add_field("age", db_int); mydb.commit_table("employee"); //creation of a record of this table... mydb.new_record("employee"); mydb.set_field("name", "john"); mydb.set_field("surname", "doe"); mydb.set_field("age", 39); mydb.commit_record(); //to save the database on a file: mydb.save_to_file("my database.xml"); What is also important is that you can create a totally dynamic database in memory (it does not need to be "hard-coded" in C++ code). At the beginning of writing quickdb, the data definition was declared in the xml file. However, the approach complicated the verification between the model kept in memory and the model from the file. Therefore, all the information from the file is just limited to the actual data. The XML file generated by quickdb looks like this: <database> <info> <name>jobs</name> <version>1</version> </info> <data> <employee> <record> <name>john</name> <surname>doe</surname> <age>12</age> </record> </employee> </data> </database> Instructions for compilation and integrationThe quickdb package is easily integrated in your program the following way:
|
||||||||||||
Copyright (c) 2001-2002 Matricsoft info@matricsoft.com |