App overview screenshotSQL and Database Guides
PostgresMySQLSQLite
Try our free SQL Client
Tools
Connecting to Postgres
Connecting to Drivers
Installing Postgres
Setting up Postgres
Postgres   >   
Connecting to Postgres   >   
TimescaleDB

Connect to TimescaleDB

How to connect to Timescale

TimescaleDB is an open-source relational database with support for time-series data. Fully managed and self‑hosted, it is built on top of Postgres.

In this tutorial, we will learn how to connect to TimescaleDB instances hosted on Timescale Cloud with Arctype.

Prerequisites

To complete this tutorial, you will need the following:

Creating a database on Timescale Cloud

Log in into your Timescale Cloud account. From your dashboard, click on create service to create a new TimescaleDB instance. This will pop up a page as shown below:

Timescale screenshot

Click on create database. This will create a new TimescaleDB instance and load a page that contains the database information. Under service information, copy and save the database password:

Timescale screenshot

After saving the database password, click on services from the left side menu and then select the new database. This will load the database dashboard, which contains all the information needed to connect the database with arctype as shown below:

Timescale screenshot

Connection information

  • Database name - the name of the current database
  • Host - the hostname of the database
  • Port - where the database is hosted
  • Username - this is the username of the database
  • Password - the password you saved earlier

Connecting the database with Arctype

Now that we have successfully created the TimescaleDB instance, let us connect it with our Arctype workspace. To do this is pretty simple and straightforward by following the steps below.

Login to your Arctype account and click on get started. This will load a page where a new connection can be added to your Arctype workspace. The next step is to select the Postgres connection type, since TimescaleDB is largely compatible with Postgres.

After selecting Postgres connections, fill in the connection credentials in Arctype with the credentials as shown on your TimescaleDB dashboard under Overview.

Arctype screenshot

Click on test connection when you're done. You should get a notification showing connection successful. Then click on save.

After the connection has been saved successfully, this will take you to the workspace shown below:

Arctype screeshot

Querying the database

Now that the database has been connected to our Arctype workspace, let's perform some operations on the database, like creating a new table using SQL.

In your Arctype workspace, click on new query and then enter the following SQL code:

CREATE TABLE `books` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `BookTitle` varchar(255) DEFAULT NULL,
  `Description` varchar(255) DEFAULT NULL,
  `Category` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1

Click on run to execute the query. Once the query is successful, a new table with the name books will be added to the database.

Conclusion

In this tutorial, we learned how to create a TimescaleDB and how to connect the database to Arctype for effective management. We were also able to create our first table in the database using a query from our Arctype workspace.

If you are new to Arctype, you can read more about it in the Arctype documentation for additional information that you will need in using this powerful tool.

Get help on databases and SQL. Join our Discord community.