Digital Developer Conference: Hybrid Cloud. On Sep 22 & 24, start your journey to OpenShift certification. Free registration

Build a library management system using CockroachDB hosted on Red Hat Marketplace

Summary

Note: This code pattern requires you to have a CockroachDB operator deployed on an OpenShift cluster as described in this tutorial, Get started using a CockroachDB operator hosted on Red Hat Marketplace. You should complete that tutorial before starting this code pattern.

In this code pattern, we show you how to build a library management system using CockroachDB hosted on Red Hat Marketplace.

CockroachDB is an elastic SQL database that easily scales transactions for your apps and services. The way that it handles serializable content makes is particularly useful for managing large sets of data and transactions.

Description

A library management system is software that maintains a library’s records. It captures data specific to the books on hand, which books have been rented, late fees, member information, and more.

When you have completed this code pattern, you will understand how to:

  • Install CockroachDB Operator from Red Hat Marketplace on an OpenShift Cluster
  • Create a CockroachDB cluster instance
  • Create a user and database in CockroachDB
  • Store and query unstructured JSON data from a third-party API in CockroachDB
  • Manage CockroachDB cluster from the Cluster Overview page

Flow

architecture diagram

  1. User performs an operation like borrowing a book or returning a book.
  2. Application updates the appropriate CockroachDB table accordingly.
  3. Application fetches the updated data from the table.
  4. Application displays the updated data that was feteched from the table.

Instructions

Find the detailed steps for this pattern in the README file. The steps will show you how to:

  1. Clone the repo
  2. Install the CockroachDB Operator from Red Hat Marketplace on OpenShift Cluster
  3. Create a Database in CockroachDB
  4. Port forward CockroachDB
  5. Run the application
  6. Explore the library management system