All Products
Search
Document Center

Hologres:Manage databases

Last Updated:Jun 09, 2023

This topic describes how to create and delete databases and specify a permission model for a database on the Database Authorization page in the HoloWeb console.

Create a database and specify a permission model

On the Database Authorization page, you can create databases in a visualized manner.

  1. Log on to the Hologres console. In the left-side navigation pane, click Go to HoloWeb to go to the HoloWeb console.

  2. In the top navigation bar of the HoloWeb console, click Security Center > Database Authorization

  3. In the upper part of the Database Authorization page, select a Hologres instance from the Instance Name drop-down list. In the upper-right corner of the page, click Create Database.

  4. In the Create Database dialog box, select a Hologres instance from the Instance Name drop-down list, and specify Database Name and SPM.Create Database

    We recommend that you select the simple permission model (SPM) to simplify authorization.

    Hologres provides the following complete and convenient permission models:

    • Expert: Hologres is compatible with PostgreSQL and provides a permission model that is exactly the same as the standard PostgreSQL authorization model. If this model is used, you can grant permissions to RAM users by executing standard PostgreSQL statements. For more information, see Standard PostgreSQL authorization model.

    • SPM: Hologres provides SPM based on the PostgreSQL authorization model to enhance user experience. SPM is a coarse-grained model that authorizes users by user group. For more information, see SPM overview.

    • Schema-level permission model (SLPM): This model divides permissions based on schemas. Compared with the SPM, this model manages permissions in a more fine-grained manner. If you want to strictly divide permissions and grant permissions with ease, we recommend that you use this model. For more information, see Overview.

    Note

    After you purchase a Hologres instance, a default database named postgres is generated. This database is provided for management purposes only. It is allocated with a few resources and is not displayed on the Database Authorization page. You can create databases based on your business requirements.

Grant permissions to a user

If you specify SPM for a created database, you can grant permissions to a user in the current instance in a visualized manner on the Database Authorization page.

  1. On the Database Authorization page, click Authorize User in the Operation column of the database the permissions on which you want to grant. The User Authorization page appears.

  2. On the User Authorization page of the database, click Grant Permissions in the upper-right corner.

  3. In the Grant Permissions dialog box, configure the User and User Group parameters.Grant Permissions

    Valid values of the User Group parameter:

    • Admin: Users in this group are the owners of the current database and are authorized to manage all objects and user groups in the current database.

    • Developer: Users in this group are authorized to read and write data in the current database, and create, delete, or modify objects by executing data definition language (DDL) statements.

    • Writer: Users in this group are authorized to read and write data in the current database.

    • Viewer: Users in this group are authorized to read data in the current database.

  4. Click OK. Then, the user can connect to the Hologres instance by using a development tool to analyze data.

    Note

    If you cannot find the required RAM user in the User drop-down list, the RAM user is not added to the current instance as a user. In this case, add the RAM user on the User Management page.

Revoke permissions from a user

If you specify SPM for a created database, you can revoke permissions from a user in the current instance in a visualized manner on the Database Authorization page.

  1. On the Database Authorization page, click Authorize User in the Operation column of the database the permissions on which you want to revoke. The User Authorization page appears.

  2. Click Revoke Permissions in the Operation column of the user from which you want to revoke permissions.Revoke permissions from a user

  3. Click OK.

    For more information about the permissions that are granted to a RAM user after you revoke permissions, see Use the SPM.

Delete a database

On the Database Authorization page, you can click Delete in the Operation column of a database to delete the database. After the database is deleted, its data is also deleted and cannot be restored.Delete a database