Knowledge Base

View Categories

How to Create and Fill a Database

Creating a Database

Managing databases is a fundamental aspect of using CodeREADr effectively. This guide will walk you through the process of creating, filling, and optimizing your database to support barcode validation and app-user tasks.

Creating a database in CodeREADr is simple:

  • Navigate to the Databases tab on the CodeREADr website.
  • Click Create a Database to create a new one and assign a name.
How to create a database

Key Notes on Databases

  • Barcode Compatibility: You can upload your own barcode values (IDs) to CodeREADr or keep them on your server for validation. There’s no requirement to use CodeREADr-generated barcodes.
  • Service Associations: Multiple services can use the same database, but each service can only be linked to one database. Duplicate scan checks are controlled at the service level, not by the database.
  • Character Limits: While scanned barcodes can have hundreds of characters, the database limits values to 500 characters. For values exceeding this limit, use the Alter Scan Value feature or contact support for alternative options.

Why Use a Validation Database?

Here are two primary reasons to use a validation database:

  1. Verify Scanned Values
    • Check if the barcode (or NFC tag, manual entry, etc.) exists in the database.
      • If valid, the app will display a Valid message with optional response text.
      • If invalid, the app will show an Invalid message.
  2. Provide Additional Information
    • Display relevant details, such as plain text, HTML, or web content, to assist app users in completing tasks.

Common Use Cases

  • Ticket Authentication: Validate ticket barcodes to confirm authenticity.
  • Asset Management: Verify if an item exists in the database and show a description.
  • ID Verification: Confirm the validity of IDs for employees, students, or members, optionally displaying their photo.

Filling a Database

To fill your database, you’ll need to upload a properly formatted CSV or TXT file. Here’s how to get started:

Accepted Formats:

  • File Types: CSV (Comma Separated Values) or TXT files.
  • Columns: A maximum of three columns is allowed.

Format Requirements

Required Column Description
Yes 1 Value – The barcode to validate (limit: 500 characters; contact support for extended options).
No 2 Response – Text, HTML, or web content shown to the user after scanning. Supports up to 10,000 characters.
No 3 Validity – Status of the value when scanned: “1” for valid, “0” for invalid (if column is empty, the default is valid).

Tips for File Preparation

  1. Avoid Hidden Characters: Excel can add invisible characters that disrupt validation. Use tools like Google Sheets or Notepad, or include column headers in Excel to avoid this issue.
  2. Save Correctly: Always save files as comma-delimited CSV or TXT.
  3. Combine Data: If you want to display multiple columns in the Response text, use the concatenate function in your spreadsheet tool to merge columns before importing.

Advanced Database Management

  • Trim Values: By default, CodeREADr removes leading and trailing spaces from barcode values. You can disable this if needed.
  • Webify Responses: Customize Response text with clickable URLs or HTML for richer app-user experiences.
  • Handle Special Characters: Save files with UTF-8 encoding to support special characters and languages.

Syncing with Google Sheets

Use the CodeREADr Connector add-on to automate database management:

  1. Upload Data: Automatically sync and upload data from Google Sheets to CodeREADr.
  2. Download Scan Records: Export scan records to Sheets for custom reports and analyses.

For setup instructions for the CodeREADr Connector, refer to our detailed guide.

Exporting Your Database

Alternative Methods for Adding Values

  • Manual Entry: Add barcode values one at a time through the database interface.
  • API Integration: Developers can use the CodeREADr API to insert values programmatically from external apps.
  • Auto-Fill: Generate and print unique barcode values using CodeREADr’s auto-fill feature.

By following these steps, you can create, manage, and optimize a validation database for seamless barcode scanning and enhanced user experiences. Whether you’re validating tickets, managing assets, or verifying IDs, CodeREADr’s tools make the process efficient and reliable.

Troubleshooting & Support

If you encounter issues like invisible characters or formatting errors, try the following:

  • Open files in a text editor to identify and remove formatting problems
  • Use Google Sheets for cleaner CSV exports.
  • Contact CodeREADr support for assistance with character limits or special features.