< All blogs
minute read

Find the ideal C++ database for C/C++ programmers with FairCom DB

FairCom DB combines the power of multiple APIs with flexible architecture

FairCom DB stands out among enterprise-class databases with its unique approach to database management through a variety of APIs and adaptable architectures. Whether you’re a developer looking for embedded solutions or require robust client-server capabilities, FairCom DB offers a versatile toolkit designed to meet your application's diverse needs.

Understanding FairCom DB’s API ecosystem

At the heart of FairCom DB lies its rich assortment of APIs, each tailored to specific programming requirements. One big difference between FairCom DB and competitors is that DB’s APIs work simultaneously over the same data.

  • ISAM API: Ideal for C/C++ developers seeking unparalleled control over data processing. This API empowers developers to craft specialized algorithms that maximize performance and capability by directly manipulating data buffers.
  • CTDB API: Offering nearly the speed of ISAM but with a drastically more simplified approach, the CTDB API operates at the column level, enhancing ease of use while maintaining significant performance benefits.
  • Direct SQL API: This API seamlessly integrates SQL so you can run statements in C/C++ code. It enables sophisticated query operations, analytics, and sorting directly within your codebase and provides built-in join algorithms.
  • JSON DB API: Simplifies data handling by treating all operations as JSON, facilitating effortless integration into modern application architectures that rely heavily on JSON for data exchange and storage. Create C/C++ app servers and easily import/export data as JSON.
  • C APIs Optimized for Developers: We pride ourselves in offering APIs by C developers for C developers. Make accessing and managing FairCom DB a natural part of your C/C++ code. While we do have some FairCom types in addition to our native C types, we provide functions to convert between the two as needed.

Each API not only serves a specific purpose but also complements the others, allowing developers to mix and match functionalities as needed within their applications.

Tailor tables to your needs

FairCom DB offers flexibility in table types to optimize performance in your C/C++ applications.

  • In-Memory Tables: Our fastest option. By leaving data entirely in memory, you get unparalleled speed, ideal for applications prioritizing real-time data access and processing.
  • Normal Tables: Persisted to disk with options for transaction control (either immediate or eventual consistency), balancing durability with performance to suit a variety of application demands.
  • Fixed-Length Record Tables: Lets your C/C++ code process tables as an array.
  • Variable-Length Record Tables: Variable-length tables give you access to advanced features such as rapid record access and dynamic schema changes without downtime. For example, Hot Alter Table instantly modifies table columns without rewriting data, meaning your application doesn’t have to wait for an alter table command to modify all records.

Maintain complete control over your database

FairCom DB began as an SDK, and while we’ve streamlined features for those looking for a plug-and-play database, C/C++ developers still have access to low-level database changes, should they need it.

You can control transactions by configuring them to be ACID-compliant, eventually consistent, or two-phase commits. You can also suspend, resume, forward, roll back, and commit transactions as needed.

Our APIs are multithreaded and support concurrent multi-statement transactions with optimistic or pessimistic record locking. Control records by locking them automatically or manually assigning control locks for specific records and keys. Suspend and resume locking anytime.

Use our C/C++ data replication API to configure and manage synchronous and asynchronous data replication and failover between servers.

Portable C code you can actually customize

You can read and customize FairCom DB’s source code. Almost all of it is available, and the code not included is available as simple, linkable object code.

Easily compile our database on every supported platform. DB includes a make file utility that automatically does it for you. We also provide dynamically. linked libraries for all our platforms. Our functions and APIs are natively compatible with your C/C++ programs, and we provide precompiled database servers, client libraries, object code, and linked libraries.

If you need to extend FairCom DB’s functionality, we provide tutorials and support for creating callbacks and plugins in C/C++. As C/C++ developers ourselves, you can be certain our support team speaks your language.

Versatile architecture for every deployment scenario

FairCom DB’s versatility extends beyond its APIs and table types to encompass adaptable deployment architectures. Each architecture uses the same APIs, meaning you can interchange architectures (or use multiple at once) without modifying source code.

Embed FairCom DB for powerful speed and integration

Use FairCom DB as an embedded C++ database server in your C/C++ application

Embedding FairCom DB into your C/C++ application grants powerful speed and integration. It’s ideal for microservices and scenarios requiring the speed of an embedded database and the ability to read and write data across a server farm.

FairCom DB gives you an enterprise-class, client-server database inside your application. Gain SQL, JSON, messaging, data replication, transactions, caching, data change capture, etc., allowing you to automatically replicate to and from a central database.

You can also simultaneously use the embedded server as a local cache, local database server, and client-server database for external client requests.

FairCom calls this approach the “Server DLL” or “bound-server” model, reflecting its dual nature as both an embedded and a client-server database.

Get the fastest data processing possible by embedding FairCom’s Direct IO engine

This architecture is ideal for performance-critical applications that demand direct access to storage without intermediate layers, ensuring optimal speed for applications like CAD software, machine learning platforms, and more.

  • Unmatched Speed: Direct read/write to disk eliminates data processing layers, locking, transaction logging, and database caching.
  • Optimal for Intensive Applications: Perfect for applications like CAD software, machine learning training platforms, IDEs, and medical devices, where exclusive data access is crucial.

In addition, FairCom DB caches data to storage and OS for high-speed memory access.

We call this our “Standalone” engine, as it allows your application to operate without an external database server.

Optimize for multi-user office applications by embedding DB’s Direct IO SQL engine

If you’re looking for a balance between performance and cost, we recommend embedding FairCom DB’s SQL engine. Support hundreds of concurrent users, and you can even link the database server to your application to upsell your customers.

We’ve had customers use DB’s SQL engine in their applications for 911 call management, dental offices, stock market firms, financial advisors, transportation, and more.

FairCom DB provides SQL through ODBC and JDBC drivers, enabling authorized data access to third-party SQL tools like report writers, analytic systems, and dashboards.

Use FairCom DB as a traditional client-server database

Client-server databases are our bread and butter. Seamlessly integrate into your C/C++ application with our client library through compiling, statically linking, or dynamically linking.

As always, the client library and embedded database use identical APIs, meaning your application automatically works with embedded or remote servers without changing the C/C++ code.

DB’s replication lets you synchronize local and central data

FairCom DB provides a robust solution for synchronizing data in real-time across distributed environments. This ensures that data remains consistent and available across multiple locations and cloud providers.

This use case is particularly valuable for managing data across a variety of scenarios, including multiple office computers, microservices, and data centers.

Turn FairCom DB into a message broker!

Did we mention that FairCom DB can also work as a change data capture solution? Combined with our FairCom MQ messaging broker, you can use DB to distribute selective data changes to external systems.

This is especially important for sending critical alerts to monitoring systems, such as in manufacturing environments. However, you can also use FairCom DB for more mundane uses, such as synchronizing local application caches with your database server.

If you want better analytics, DB can funnel operational data into data warehouses and data lakes for further processing.

With FairCom MQ, you can publish specific data changes within selected tables. These changes are then published to topics on the FairCom MQ messaging broker. MQ sends these changes as a JSON document detailing the data before and after the change. You can then process the data changes by using MQTT client software to subscribe to these topics.

FairCom DB: It’s more than just a database

We’re proud to offer a product that goes beyond your typical C++ database. FairCom DB is a comprehensive toolkit dedicated to empowering developers with the flexibility, performance, and reliability needed for today’s intricate application environments.

Whether it’s integrated with cloud services, deployed across a network, or embedded in a local application, FairCom DB’s resilient APIs and adaptable architectures guarantee that developers can efficiently and effectively meet their application’s requirements.

For developers looking to maximize the potential of their C/C++ applications with a database that provides unparalleled control and performance, FairCom DB is a shining example of innovation in database technology.

Ready to explore more of FairCom DB? Feel free to read through our documentation, or you can schedule a personalized demo with one of our engineers.

Written by:
Mike Bowers
Last Update:
July 25, 2024
Tags:
FairCom DB
SQL
NoSQL