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.
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
- User performs an operation like borrowing a book or returning a book.
- Application updates the appropriate CockroachDB table accordingly.
- Application fetches the updated data from the table.
- Application displays the updated data that was feteched from the table.
Find the detailed steps for this pattern in the README file. The steps will show you how to:
- Clone the repo
- Install the CockroachDB Operator from Red Hat Marketplace on OpenShift Cluster
- Create a Database in CockroachDB
- Port forward CockroachDB
- Run the application
- Explore the library management system