Types of View

  • View : This is the ordinary view of table(s). These views reference the table directly when queried.

  • Materialized View : This is view of a Remote Table(s). It is "materialized" hence created locally unlike ordianary views. There are 2 Types of Materialized Views:
    • Snapshot View : This Materialized view is a Snapshot of the Remote Table. It is a view of the Table at a specific time and does not get updated.
    • Refresh View : This Materialized view "Refreshes" the data of the Remote Table over a specified time. There are 2 kinds of Materialized Refresh Views:
      • Periodic Refresh View: This Materialized Refresh View updates the Remote Table data after specific invervals of time. The Refresh time can be specified in the configuration.
      • Synchronous Refresh View : This Materialized Refresh View updates the Remote Table data as soon as the data is changed in the Remote Table. It 'Synchronizes' with the Remote Table to show immediate updates.


Types of Index

  • BTree : Binary Tree Based Index is the default index. It stores data in form of a BTree.

  • TIDBTree : Tuple ID Binary Tree Based Index

  • DeltaBTree : Distributed Binary Tree Index is used for Remote Table Access. It stores changed data of the table and is required for distributed table access.

  • QBTree: Query Binary Tree Index

  • SyncTreeMap : Syncronized Binary Tree Index

  • TreeMap : Tree Map Index

  • SimpleHashIndex : Simple Hash Index is an in-memory index. It provides quick hashing to return results very fast at the cost of storing every tuple in the memory.


Types of Identifiers

  • Identifier: It is a combination of alphabets(A-Z or a-z), digits (0-9) and '_'. It has to strictly start with a alphabet. But it cannot be a SQL keyword.
    Valid eg: applibase, mytable, c1, temp123, temp_table
    Invalid eg: 123temp, table, temp-table

  • Address identifier: This is similar to identifier, but it allows '-' along with the alphabets and digits. It can start either with an alphabet or with a digit. Most of the time, it is just used as part of Email identifiers or Global identifiers.
    Valid eg: applibase, web_admin, com-anon-via-localhost
    Invalid eg: admin@applibase, applibase.com

  • Delimited identifier: These Identifiers are charecter strings which are always specifeied within double quotes. A delimited Identifier is case sensitive and can contain any special charecter unlike Regular Identifiers. Another important charectesistic is that standard SQL Keywords may also be used as Selmited Identifiers. Delmited Identifiers should always be quoted and each of the double quote within the Delmited Identifier should be escaped with a ("). i.e. two double quoted int the identifier represents one.
    Valid eg: "table", "table#1", "TabLE*&^", "Table""s", "sql reference"
    Invalid eg: "tab"le", identifier

  • Qualified identifier: As the name indicates, qualified identifier is nothing both an identifier which is qualified. These are those identifiers which are preceeded by another identifier, separted by '.'. Again SQL keywords cannot be used here.
    Valid eg: home.myschema, home.myschema.mytable, mytable.c1, myschema.table1.c1, home.schema1.table1.c1, myschema.webadmin@applibase.com
    Invalid eg: applibse, mytable, table, schema.table, schema.mytable


Types of Literals

  • Integer literal : Any integer value in Decimal, Hexadecimal or Octal format.
    eg: 29 (Decimal), 0XAB (Hexadecimal), 23 (Octal).

  • Floating point literal : Any floating point number with optional decimal point followed by optional exponent.
    eg: 0.25, .28, 0.45e-10, 29, 9E-5

  • String literal : Any set of characters except single quote('), enclosed within a pair of single quotes('').
    eg: 'Applibase', 'This is an example', 'Which constraint?', 'side-by-side'

  • Interval literal : Interval literal is of the form
    INTERVAL [+ | -] 'yy-MM-dd hh:mm:ss.nnnnnn' Interval_Qualifier [ TO Interval_Qualifier ]
    Interval_Qualifier can be one of the following:
    YEAR, MONTH, DAY, HOUR, MINUTE, SECOND.
    eg: INTERVAL '13 0:10' DAY TO SECOND, INTERVAL -'1-6' YEAR TO MONTH, INTERVAL '99 0:10:00.999999' DAY TO SECOND

  • Date literal : A Date literval is of the form DATE 'yyyy-MM-dd'. Every field of the date literal is mandatory.
    eg: DATE '1993-08-24'

  • Time literal : A Time literval is of the form DATE 'hh:mm:ss'. Every field of the time literal is mandatory.
    eg: TIME '16:03:00'

  • TimeStamp literal : A TimeStamp literval is of the form DATE 'yyyy-MM-dd hh:mm:ss.nnnnnn'. Every field of the time stamp literal is mandatory.
    eg: TIMESTAMP '1993-08-24 16:03:00', TIMESTAMP '1996-08-24 16:03:00.999999'


System Variables

  • USER : Gives the current user logged in to a particular database.
  • SYSTEM_USER : Gives the logged in system user.
  • CURRENT_ROLE : Gives the current role.
  • LONG_CURRENT_TIMESTAMP : Gives the Current timestamp as a long value, in terms of milliseconds.
  • CURRENT_TIMESTAMP : Gives a TimeStamp object with current date and time values.
  • CURRENT_DATE : Gives a Date object with current date value.
  • CURRENT_TIME : Gives a Time object with current time value.


User Variables

  • CatalogName : Catalog name should be an identifier.
  • SchemaName : Schema name can be either a identifier, a qualified identifier, a delimited identifier or even a email identifier.
  • TableName : Table name can be either a identifier, a qualified identifier, a delimited identifier or even a Global identifier. Table name can also be "@" followed by a identifier, which is used to access user tables. Both qualified identifiers and identifiers preceeded by "@" are not allowed in CreateTable statement.
  • TableAlias : Table alias can be either a identifier or a delimited identifier.
  • ColumnName : Column name can a identifier, a delimited identifier or a Qualified identifier. Qualified identifiers are not allowed in CreateTable statment.
  • ColumnAlias : Column alias should be an identifier.
  • ConstraintName : Constraint name should be an identifier.
  • ProcedureName : Procedure name should be an identifier.
  • RoutineName : Routine name should be an identifier.
  • IndexName : Index name should be an identifier.
  • TriggerName : Trigger name can be either an identifier or a qualified identifier.
  • RoleName : Role name should be an identifier.
  • GranteeName : Grantee name should be an identifier.
  • RemoteGranteeName : Remote Grantee Name should be an email identifier.