Skip to main content

FAQ

Q1: What are Databend's primary objects, hierarchy, and associated privileges?

The diagram illustrates the hierarchical structure of Databend objects across two levels. Fine-grained privileges and ownership are designed for each type of object, providing flexibility. For more information, see Access Control.

Alt text

Q2: How do I create a table in Databend?

Use the CREATE TABLE command to create a table in Databend:

Example:
CREATE TABLE example (
-- Except for DECIMAL, no need to specify field length.
c1 INT,
c2 VARCHAR,
c3 DATETIME,
c4 DECIMAL(20, 2),
c5 BITMAP,
c6 TUPLE (FLOAT, FLOAT)
);

Q3: What are the data type mappings across Databend, MySQL, and Oracle?

This table provides an outline of the mapping of data types between Databend, MySQL, and Oracle.

DatabendMySQLOracle
TINYINTTINYINTNUMBER(3,0)
SMALLINTSMALLINTNUMBER(5,0)
INTINTNUMBER(10,0)
BIGINTBIGINTNUMBER(19,0)
FLOATFLOATFLOAT
DOUBLEDOUBLEFLOAT(24)
DECIMALDECIMALNUMBER
DATEDATEDATE
TIMESTAMPTIMESTAMPNUMBER
DATETIMEDATETIMEDATE
YEARINTNUMBER
VARCHARVARCHARVARCHAR2
VARCHARCHARCHAR
BINARYVARBINARYRAW, BLOB
VARCHARTEXTVARCHAR2
VARCHARLONGTEXTRAW, CBLOB
VARCHARMEDIUMTEXTRAW, CBLOB
VARCHARENUMVARCHAR2
VARCHARSETVARCHAR2
VARCHARbitCHAR
ARRAYN/AN/A
BOOLEANN/AN/A
TUPLEN/AN/A
MAPN/AN/A
JSON, VARIANTJSONJSON
BITMAPN/AN/A