This topic describes the basic concepts of accounts, user roles, instances, databases, schemas, internal tables, foreign tables, and partitioned tables in Hologres.
Accounts
-
Alibaba Cloud account
An Alibaba Cloud account, also known as a root account, is used to create and manage Hologres instances. It can grant administrative permissions to other users.
The following table describes the supported formats for an Alibaba Cloud account.
Account format
Description
Example
ALIYUN$<AccountName>@aliyun.com
<AccountName> is the logon name of the Alibaba Cloud account.
ALIYUN$company@aliyun.com<AccountName>@aliyun.com
company@aliyun.com<Account ID>
The ID of the Alibaba Cloud account.
1344445678xxx -
Resource Access Management (RAM) user
A RAM user, also known as a sub-account, can create and manage databases and tables in an instance within the scope of permissions granted by an Alibaba Cloud account.
The following table describes the supported formats for a RAM user.
Account format
Description
Example
p4_<Account ID>
-
p is a lowercase letter.
-
<Account ID> is the ID of the Alibaba Cloud account.
p4_12345678xxx<subUserName>@<Account Name>.onaliyun.com
-
<subUserName> is the logon name of the RAM user.
-
<AccountName> is the logon name of the Alibaba Cloud account.
-
<AccountID> is the ID of the Alibaba Cloud account.
holouser@company.onaliyun.com<subUserName>@<Account Name>
<subUserName>@<Account ID>.onaliyun.com
RAM$<subUserName>
RAM$<AccountName>:<subUserName>
RAM$<Account ID>:<subUserName>
<subUserName>@<Account ID>
-
User roles
-
Super administrator
By default, the Alibaba Cloud account used to purchase an instance is the super administrator (Superuser). A Superuser has all permissions on the entire instance, such as creating and deleting databases, creating roles, and granting permissions to roles.
-
Regular user
A regular user can access an instance and perform data development within the scope of their permissions, which are granted by a Superuser. A regular user can also be granted Superuser permissions.
Instance
An instance is an entity that you use to manage database storage services. All of your database operations are performed within an instance.
Database
A database is a repository where data is organized, stored, and managed based on its data structure. In a database, you can create, update, or delete tables, and perform operations related to functions.
After you purchase a Hologres instance, the system automatically creates a database named postgres. This database is allocated a small number of resources and is used only for management. You should create a new database for business development. To create a new database, see CREATE DATABASE.
Schema
A schema is a collection of database objects, similar to a directory in a file system. Objects such as tables and functions in an instance are stored in schemas.
After a database is created, the system creates a default schema named public. All operations on instance objects are performed in this schema by default. You can also create new schemas. For more information, see CREATE SCHEMA.
-
Schemas cannot be nested.
-
Object names must be unique within a schema.
-
Objects in different schemas can have the same name.
Table
A table is a data storage unit that consists of rows and columns. The number and order of columns are fixed, and each column has a name. The number of rows is variable and indicates the amount of data stored in the table at a given time.
Each column in a table has a data type that specifies the type of values for that column. For more information, see Data type summary.
Hologres includes the following two types of tables:
-
Internal table
A table whose data is stored in Hologres. The data types in the table can be any type that Hologres supports.
-
foreign table
A table that does not store data in Hologres but instead maps to fields in an external data source. The data in a foreign table is read-only. You cannot execute Data Manipulation Language (DML) statements or create an index on a foreign table.
You can create foreign tables in Hologres to accelerate queries on data from external data sources, such as MaxCompute.
To create a foreign table in Hologres, see CREATE FOREIGN TABLE.
Partitioned table
A partitioned table is a parent table that is divided into smaller subsets called partitions based on a key value. Different types of data are stored in different partitions. Hologres currently supports only list partitioning on a single key value. When you query data, you can filter query statements by partition key to exclude irrelevant partitions and improve query performance.
To create or delete a partitioned table in Hologres, see CREATE PARTITION TABLE and DROP PARTITION TABLE.
Engine components
Hologres is a distributed real-time data warehouse that contains many internal components. You do not need to understand all components, but understanding the main ones can help you use Hologres more effectively.
-
Frontend (FE)
The Hologres frontend (FE) is responsible for SQL authentication, parsing, and optimization. An instance has multiple FEs. Hologres is compatible with the PostgreSQL 11 ecosystem. This compatibility lets you use standard PostgreSQL syntax for development. You can also use PostgreSQL-compatible development tools and Business Intelligence (BI) tools to connect directly to Hologres.
The Query Engine (QE) is responsible for executing queries. The QE has the following main components.
-
HQE (Hologres Query Engine)
The Hologres Query Engine (HQE) is a proprietary execution engine developed for Hologres. It uses a scalable Massively Parallel Processing (MPP) architecture for fully parallel computing. Vectorized operators maximize CPU computing power to deliver optimal query performance. The QE primarily consists of the HQE.
-
PQE (Postgres Query Engine)
This engine provides extension capabilities that are compatible with PostgreSQL. It supports various extension components of the PostgreSQL ecosystem, such as PostGIS and user-defined functions (UDFs), such as PL/JAVA, PL/SQL, and PL/Python. Some functions and operators that are not yet supported by the HQE are executed by the PQE. Continuous optimizations are made in each version. The ultimate goal is to deprecate the PQE.
-
SQE (Seahawks Query Engine)
This engine seamlessly connects to the MaxCompute execution engine to provide native access to MaxCompute. You can access various MaxCompute file formats and complex tables, such as hash-clustered or range-clustered tables, with high performance and full compatibility without needing to migrate or import data. This enables interactive analysis of petabyte-scale offline data.
-
-
Storage Engine (SE)
The Storage Engine (SE) is responsible for managing and processing data, including create, read, update, and delete (CRUD) operations.