Create a Sample Database
Up to now, Hasura and YugabyteDB services are running in AWS, but there is no data to experiment with. In this section, we’ll use Yugabyte CloudShell to create a sample database that stores Todos assigned to specific Users. You might already be familiar with this sample database if you’ve ever completed Hasura tutorials designed for PostgreSQL.
Follow the steps below to create the Todos and Users table in YugabyteDB:
- Open Yugabyte Cloud and Launch the Cloud Shell:
- Once in the Shell, create the Users table:
- Create the Todos table:
- Initialize the Users table with two records:
- Execute
SELECT * FROM Users
and confirm the following output:
id | name | created_at | last_seen----+-------+----------------------------+-----------1 | Mark | 2022-02-02 18:49:45.092247 |2 | Jenny | 2022-02-02 18:49:45.092247 |(2 rows)
Did you find this page helpful?
Start with GraphQL on Hasura for Free
Build apps and APIs 10x faster
Built-in authorization and caching
8x more performant than hand-rolled APIs

