V10 Database Integration Guide

Use this page to learn more about Database Integrations.

In-Memory Stub Database

Before configuring your database, we recommend running the FaceTec Server in-memory by first using a Stub Database. While simple in design, it can help you determine major integration-related behaviors early in the configuration process. To run the FaceTec Server in-memory, follow either step 1 or 2 in the Setting up the FaceTec Server Guide. Once you have the FaceTec Server running, you can use the Core API Suite of Postman Tests to verify that everything is working correctly. If all of the Postman Tests are passing, then you can begin to configure your FaceTec Server with a Database.

Important Note: Zero data is stored when using an In-Memory Stub Database. If you need to save FaceMaps, transaction information, or audit trails, then you should use an external database instead.

Database Configurations

The FaceTec Server supports many different database management systems, including MongoDB, PostgreSQL, MySQL, MSSQL, and Oracle DB. To configure the FaceTec Server with a specific database, you will need to either write your own Java class that inherits from FaceTecDatabase or write custom code that implements the endpoints supported by FaceTecDatabase.

MongoDB Database

For those using a MongoDB Database, FaceTecDatabase has already been fully implemented and will work with the default package. While this configuration can be further customized, it has already been designed to perform Liveness Checks, Face Scans, and ID Scans.

To set up your own MongoDB instance, see the MongoDB Setup Guide.

Once your MongoDB Instance is configured, you can connect it to the FaceTec Server. To verify it is properly configured, we recommend first running the FaceTec Server locally and then remotely.

SQL Database

For those using a SQL Database,  FaceTecDatabase has already been fully implemented for several SQL Products and will work with the default Server Package. While this configuration can be further customized, it has already been designed to perform Liveness Checks, Face Scans, and ID Scans.

Important Note: SQL-based technologies can have certain performance-related behaviors storing Binary Data, like Image Data and 3D FaceScan/FaceMap/IDScan Binary Blobs. Due to this, a SQL-based Implementation will need to have its own code written that stores and looks up these data types in a separate Binary-Storage Space.

To set up your own SQL instance, see the SQL Setup Guide.

Once your SQL Database Instance is configured, you can connect it to the FaceTec Server. To verify it is properly configured, we recommend first running the FaceTec Server locally and then remotely.

Important Note: The default example PostgreSQL connection string 'jdbc:postgresql://localhost:5432/facetec_sdk_data' assumes Your Database name is 'facetec_sdk_data'. You can use any PostgreSQL-compatible database name, but Your Database must be created before initializing Your FaceTec Server Webservice so it works as expected. Tables and indexes required for FaceTec Server functions will be created automatically.

Data Storage Strategy

The Database with Your FaceTec Data is owned and managed by Your Team. You and Your Team have 100% control over Data Storage and Deletion, including what type of Data is stored, how long Data is stored, and when Data should be deleted.

To learn more about creating a Data Storage Strategy, see Reviewing & Altering Data Storage in Your Architecture.

Migrating your FaceTec Database

Migrating your FaceTec Database is the same as migrating any other database. You will first need to export a copy of your database into the new system. Once you have finished migrating your database, you will need to load it into the new system. Finally, you will need to update your code to reference the new database. In summary, there are three steps for Database Migration:

  1. Copy/Export your Database*
  2. Load the Database into the new system
  3. Update your code to reference your new database

Migrating the Database connected to your FaceTec Server can be accomplished in the same way as migrating any other Database. You own the Database, and FaceTec can only provide high-level guidance in these specific scenarios.

Before migrating your database, we recommend planning and reviewing your process for a zero-downtime migration.

* For the Search DB (3D-DB), you can use the Export API to make a copy of your Search DB. This API writes your database to a new folder, capturing the current state of your 3D-DB. It should be noted that the Export API is a Core API, so you will need to program your own functionality around it.