Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

CUBRID Manager Database Components Table


When you log in to the database, you can see accessible tables and system tables and columns and index in the navigation tree.

If you right-click the Table in the navigation tree, you can view the Create Table, Create Like Table, and Refresh menus.


Create Table

Right-click Tables in the navigation tree and then select Create Table or click Create Table from the toolbar. Then, a wizard which makes you create a new table will appear.

  • General tab : You can define the name of the table to be added and add, edit and drop columns. You can also set the primary key (PK) and, before the table is created, adjust the position of the selected column by using and .
    Using the add column wizard, you can set the name, type, default value and constraints of the column to be added. You can also set to display a warning message when you enter something that is not grammatically correct, or to disable the selection of a grammatically incorrect entry.
    • Reuse_OID : If this option is selected, a table is created with the option REUSE_OID applied. For this kind of table, using with OID is restricted. For more information on OID reuse table, see "Table Options (REUSE_OID)" in the CUBRID online manual.
  • FK/Indexes tab : You can set foreign keys and indexes.
    • Add Foreign Key : Using the add foreign key wizard, you can set the name of the foreign key, the name and primary key of the reference table and the trigger actions to maintain referential integrity. The ON UPDATE, ON DELETE and ON CACHE OBJECT options are provided.
    • Add Index : You can set index name, index type, a column to be indexed. Ascending (asc) and descending (desc) sorting can be selected within the supported range. For REVERSE indexes, only descending sorting is supported.
  • Partition Tab : Supports partitioning setting and modification of the given table.
    • Add Partition : Using the add partition wizard, you can set the partition type and expression. The RANGE, LIST and HASH partitions are supported.
    • Edit/Delete Partition : You can edit or delete partition.
  • SQL Statement Tab : You can check and copy SQL statements created according to the settings in General, Foreign Key/Index and Partition tabs.


Adding Object Oriented Tables

To add a table with object-oriented properties, select Show object oriented related properties. When you select Show object oriented related properties, the Inheritance tab is added.

  • General tab : When you select Show object oriented related properties, Shared, Inheritance and Table column are added as a column in the table. When adding or editing columns, you can choose the column type as shown in the figure below. You can choose OBJECT or a table in the database as the data type.
  • Inheritance tab : You can define the super table to inherit from. If a column name conflict occurs, it can be adjusted.


Select All


Right-click a table in the navigation tree and select Select All. Or you can drag and drop the table into the editor results pane of the Query editor when it is open. Then, a new Query editor opens and retrieves the entire data.


Select Count

Retrieves a total data count of the table and performs the same functionality as the following syntax.

SELECT COUNT(*) FROM table_name



DELETE ALL

Deletes all records from the table and performs the same functionality as the following syntax.

DELETE FROM table_name



TRUNCATE TABLE

Deletes entire data in the table. It can delete all records including indexes and constraints in a table, so it is faster than DELETE ALL. The ON DELETE trigger is not activated when you use the TRUNCATE TABLE. It can perform the same functionality as the following syntax.

TRUNCATE TABLE table_name




Insert Records

You can insert values for each column while checking its type and constraints.

  • When you add more than one instance, you can separate them by adding a line break character between each query and its result.
  • You can move the cursor to the next field by pressing the Enter key when you enter a value for each field.
  • When you click the Clear button, the value in the input box and the execution history are initialized.
  • The execution history pane cannot be edited.
  • For DATE, TIME, TIMESTAMP and DATETIME data types, you can enter different data for each type. For example, for a DATE type, you can enter data such as SYSDATE, SYS_DATE, CURRENT_DATE and DATE'2009-07-05'.


Import Data

You can import data from an Excel or CSV file into the database. You can use File charset to get data from a file, and use JDBC charset to specify charset for data to be stored in the database. To change the value for JDBC charset, right-click the mouse and then select Properties.

By selecting Ignore or Break, you can change the way when an error occurs in the process of import.


Export Data

You can export data (usually in one or more tables) in Excel (.xls), CSV, SQL, or CUBRID load (.obs) format. A file name is created with a table name and it is saved in the path specified in File path. You can choose File charset when exporting data.


Drop Table

Drops the selected table. This is the same as the DROP TABLE statement.


Rename Table

You can change the name of the current table. It is the same as RENAME TABLE statement.


Create Like Table

Creates an empty table which has the same schema structure with an existing one. It works the same as CREATE TABLE LIKE. For more information, see "CREATE TABLE LIKE" in the CUBRID online manual.


Edit Table

You can use all functionalities of Create Table in Edit Table as well. However, you cannot adjust the order of columns in the table.


Table Information

You can check the schema information of the table by double-clicking it.


Execute Defined SQL

With Execute Defined SQL menu, you can execute "prepared statement," pre-saving a specific query statement and specifying a new parameter value for the statement whenever the query is executed.

You can execute the SELECT statement which meets specified conditions by entering a parameter value of defined "prepared statement" by using Select by input value.

You can execute the INSERT statement by entering a parameter value of defined "prepared statement" by using Insert by input value.

You can use Select by read file when repeating the execution of SELECT statement by inputting several parameter values in the defined "prepared statement." The data is saved in Excel (.xls) or CSV format. You can configure a  file charset where parameter values are saved, the number of concurrent threads to be executed, and commit cycle. To change the value for JDBC charset, right-click the mouse in Explorer and then select Properties.

You can use Insert by read file when repeating the execution of INSERT statement by inputting several parameter values in the defined "prepared statement." The data is saved in Excel (.xls) or CSV format. You can configure a  file charset where parameter values are saved, the number of concurrent threads to be executed, and commit cycle. To change the value for JDBC charset, right-click the mouse in Explorer and then select Properties.


Copy SQL to Editor

A convenient function is provided that allows you to copy DDL and DML in a selected table to the current editor. If there is no editor opened, a new editor will opened and show the DDL or DML in it. The text in menu item gives the format of the statement. You can modify it based upon your requirements. INSERT, SELECT, CREATE, UPDATE, DELETE and GRANT statements are included.


Copy SQL to Clipboard

Like Copy SQL to Editor, you can copy DDL and DML in a selected table. But the difference is the object address is clipboard.


Copy SQL to File

You can copy DDL and DML in a selected table to a given file.

comments powered by Disqus
Page info
viewed 4278 times
translations en
Author
posted 2 years ago by
newpcraft
Contributors
updated 2 years ago by
View revisions
tagged
Share this article