Managing Tables and Indexes Using Console
Learn how to manage Oracle NoSQL Database Cloud Service tables and indexes from the Console.
This article has the following topics:
Related Topics
Editing Tables
You can update reserved capacity (if the table is not an Always Free NoSQL table) and Time to Live (TTL) values for your Oracle NoSQL Database Cloud Service tables from the NoSQL console.
- Access the NoSQL console from the Infrastructure Console. See Accessing the Service from the Infrastructure Console .
- The NoSQL console lists all the tables in the tenancy.
- The value of Time to Live (TTL) can be updated.
- To update the value of Time to Live (TTL), click the Edit link next to the Time to live (Days) field.
- You can also update the value of Time to Live (TTL) by clicking the action menu corresponding to the table name you wish to change and select Edit default time to live.
- If the table is a child table, only the Time to live
(TTL) value can be updated. To update the value of Time to Live
(TTL), click the Edit link next to the Time to
live (Days) field.
Note:
You cannot edit the reserved capacity of a child table directly. Only the corresponding values of the parent table can be edited. - Table Time to Live (Days): (optional) Specify the
default expiration time for the rows in the table. After this time, the rows
expire automatically, and are no longer available. The default value is
zero, indicating no expiration time.
Note:
Updating Table Time to Live (TTL) will not change the TTL value of any existing data in the table. The new TTL value will only apply to those rows that are added to the table after this value is modified and to the rows for which no overriding row-specific value has been supplied.
- If your table is not an Always Free NoSQL table, then the reserved capacity and
the usage model can be modified.
- Under More Actions, click Edit reserved capacity.
- You can also update the Reserved Capacity by clicking the
action menu corresponding to the table name you wish to change and select
Edit reserved capacity.
Modify the following values for the table:
- Read Capacity (ReadUnits): Enter the number of read units. See Estimating Capacity to learn about read units.
- Write Capacity (WriteUnits): Enter the number of write units. See Estimating Capacity to learn about write units.
- Disk Storage (GB): Specify the disk
space in gigabytes (GB) to be used by the table. See Estimating Capacity to
learn about storage capacity.
You can also modify the Capacity mode from Provisioned Capacity to on Demand Capacity or vice-versa. If you provision units greater than what the on Demand capacity can offer, and then If you switch from Provisioned capacity to On Demand capacity, the capacity of the table will be reduced. You should take into consideration the reduction in the capacity due to the switch in this scenario.
- (Optional) To dismiss the changes, click Cancel.
- Change in storage capacity or the value of table TTL have global scope (change in one regional table replica is automatically propagated to all regional table replicas).
- Change in read units, write units or change in capacity mode from On-Demand to provisioned or vice-versa have a local scope (change only in the regional table replica where it is initiated).
Moving Tables
Learn how to move Oracle NoSQL Database Cloud Service table to a different compartment from the NoSQL console.
- Access the NoSQL console from the Infrastructure Console. See Accessing the Service from the Infrastructure Console .
- The NoSQL console lists all the tables in the tenancy.
- In the Table Details page, click Move Table.
- Alternatively, Click the action menu corresponding to the table name and select Move table.
- In the Move Resource to a Different Compartment window, modify the following
values for the table:
- Choose New Compartment: Select the new compartment from the select list.
- Click Move table.
- (Optional) To dismiss the changes, click the Cancel link on the top right corner.
Note:
You cannot move a child table to another compartment. If the parent table is moved to a new compartment, all the descendant tables within the hierarchy will be automatically moved to the target compartment in a single operation.Deleting Tables
Learn how to delete Oracle NoSQL Database Cloud Service tables from the NoSQL console.
If the table is a Global Active table, you can drop the table only if there are no regional replicas currently added to the table. Otherwise, the regional replicas should be deleted first before dropping the table.
Deleting Indexes
Learn how to delete Oracle NoSQL Database Cloud Service indexes from the NoSQL console.
Altering Singleton Tables
Learn how to alter singleton tables by adding in simple or advanced mode, or deleting columns using the NoSQL console.
- Simple Input Mode: You can use this mode to alter the NoSQL Database Cloud Service table declaratively, that is, without writing a DDL statement.
- Advanced DDL Input Mode: You can use this mode to alter the NoSQL Database Cloud Service table using a DDL statement.
Note: In a Global Active table, the schema of the table cannot be changed. You cannot add new fields or remove existing fields from a Global Active table.
Adding Table Columns: Simple Input Mode
Learn how to add table columns to an Oracle NoSQL Database Cloud Service table by using the Simple Input table column update mode.
Adding Table Columns: Advanced DDL Input Mode
Learn how to add table columns to an Oracle NoSQL Database Cloud Service table by using the Advanced DDL table column update mode.
Deleting Table Columns
Learn how to delete columns from a singleton table.
- Access the NoSQL console from the Infrastructure Console. See Accessing the Service from the Infrastructure Console.
- The NoSQL console lists all the tables in the tenancy. In the Table Details page, select the Columns tab under Resources. You will see a list of all the columns added to the table.
- Click the three vertical dots at the end of any non-primary key column to be
deleted. You get a confirmation message if the column can be deleted. Once you
confirm, the column is deleted.
Note:
The columns of a Global Active table cannot be deleted as the schema is frozen.
Change the schema of a Global Active table
You should avoid changing the schema of a Global Active table as any changes to the schema involve re-synchronizing data to all replicas.
- Drop the replicas of the table whose schema has to be changed.
- In the table details, click Unfreeze to change the schema of the singleton table back to Mutable.
- Change the schema of the table.
- In the table details, click Freeze to freeze the schema of the table. The Schema state changes to Frozen.
- Re-create the regional table replicas.
Drop a regional replica
You can drop a regional replica of a Global Active table.
From the Tables page, Under Resources, click Replicas. All Replicas of the Global Active table are listed. To remove a regional replica, click the three dots on the right side of the regional replica and choose Delete. Once you provide a confirmation, the regional replica is deleted. Once all the regional replicas are removed, the Global Active table becomes a singleton table.
Dropping replicas of parent-child tables:
Dropping a replica is to drop the table in the replica region. A parent-child table has dependencies. When the child table is a Global Active table, before you drop a replica from a parent table, you need to drop the replica from the child table first. You drop a replica from the bottom to the top of the table hierarchy in a parent-child table (drop the child from the replica first and then the parent). If the child table is a Global Active table, use drop-replica from the other replica region to drop it. If the child table is a singleton table, use drop-table to drop it from the replica region.
- Table A is a GAT having replicas on iad, phx, and sjc
- Table A.B is a GAT having replicas on iad, phx
- Table A.B.C is a singleton table in the region phx
- on phx, drop table A.B.C
- on iad, drop replica phx from table A.B
Change a Global Active table to a Singleton table
You can remove all replicas from a Global Active table and it changes back to a singleton table.
- In the Table Details page, click Replicas under Resources. You get a list of regional replicas that are added to the table.
- Click the action menu corresponding to the regional replica you wish to delete and select Delete.
Once all the replicas are deleted, the table becomes a singleton table. You can verify this by looking at the list of tables in your database. Under Tables, you can see that the Global active option for this table has a value No.