tacnode
Get started

Tacnode in 10 minutes

This article provides quick steps to help you understand how to create a Nodegroup, obtain connection information, and create a database for data writing and querying.

1. Prerequisites

1. Register a Tacnode account

To access the Tacnode registration page, visit Tacnode Signup. New users can register using their email address.

2. Install the psql terminal

Refer to the client installation method provided by the PostgreSQL official website to install PSQL.

2. Activate the service

1. Create Data Cloud

The Data Cloud is where you manage database storage and computing service resources. All operations on your data must be completed in Data Cloud. For more information, refer to Data Cloud.

Log in to Tacnode to access the Tacnode WEB interface. Then, open the Data Cloud management page to create a new Data Cloud. Subsequent operations can be completed in the corresponding Data Cloud Center.

2. Create Nodegroup

Nodegroup is Tacnode's computing module. It handles all database DDL, DML, and other operations. Create a Nodegroup before performing SQL operations. For more information, refer to Nodegroup(/docs/guides/platform/nodegroup).

Enter the Nodegroup management page and click "+Nodegroup" to create a new Nodegroup in the following two ways:

  • Visit Data Cloud to open the Data Cloud management page, click Data Cloud to enter Data Cloud Center > Nodegroup.
  • Visit https://<cloud_regionid>-app.tacnode.io and go directly to Data Cloud Center > Nodegroup.
    • <cloud_regionid> is the identifier of the cloud platform region and is consistent with the cloud platform. For more information, refer to Regions Supported by Tacnode. Tacnode Regions.

3. Connect to Nodegroup

Nodegroup enables VPC network access by default. Use public network access in this case.

On the Nodegroup details page, click the network link and enable public network access to obtain the public domain name and port of Nodegroup and the psql connection.

psql connection: psql -U <Account> -d postgres -h <Host> -p 5432

  • <Account>: Tacnode Account
  • <Host>: Nodegroup public network connection domain name

4. Create Objects

Create a database

Use CREATE DATABASE to create a tac_test database:

CREATE DATABASE tac_test;

Switch to the tac_test database you just created using the following command.

postgres=# \c tac_test
You are now connected to database "tac_test" as user "judy".
tac_test=#

Create a table

Use CREATE TABLE to create the cars table:

CREATE TABLE cars (
  brand VARCHAR(255),
  model VARCHAR(255),
  year INT
);

The execution results are as follows:

tac_test=# CREATE TABLE cars (
  brand VARCHAR(255),
  model VARCHAR(255),
  year INT
);
CREATE TABLE
tac_test=# \d cars
                       Table "public.cars"
 Column |          Type          | Collation | Nullable | Default
--------+------------------------+-----------+----------+---------
 brand  | character varying(255) |           |          |
 model  | character varying(255) |           |          |
 year   | integer                |           |          |
 
tac_test=#

5. Writing and Querying

Writing Data

Use INSERT INTO to write data to the cars table:

INSERT INTO cars (brand, model, year)
VALUES ('Ford', 'Mustang', 1964);

The execution results are as follows:

tac_test=# INSERT INTO cars (brand, model, year)
VALUES ('Ford', 'Mustang', 1964);
INSERT 0 1

Query Analysis

Use SELECT to query the result of the data just written.

SELECT * FROM cars;

The execution results are as follows:

tac_test=# select * from cars;
 brand |  model  | year
-------+---------+------
 Ford  | Mustang | 1964
(1 row)

Update Data

Use UPDATE to update the existing data.

UPDATE cars
SET model = 'NEWMustang'
WHERE brand = 'Ford';

The execution results are as follows:

tac_test=# UPDATE cars
SET model = 'NEWMustang'
WHERE brand = 'Ford';
UPDATE 1
tac_test=# select * from cars;
 brand |   model    | year
-------+------------+------
 Ford  | NEWMustang | 1964
(1 row)
 
tac_test=#

On this page